This was just a quick mod for someone here on the forums that was deaf. It simply adds a few buffs that activate when animals and enemies are within 20 blocks of you. Once the buff fires it will adds a small blinking orange dot to the screen to notify you that something is around you. At 8 blocks, these icons will change to blinking red icons to show they are now close by.
It uses the same dot for enemies and hostile and passive animals, but they have separate icons for when they get close. This is easily changed, as is the distance each warning shows up at. It’s pretty straightforward in buffs.xml.
This should work fine as a serverside only mod.
The forum topic of the mod is here.