This plugin simply does protect sleepers from being killed by animals. The attacking animal will turn into "Flee"-mode once it attacks.
Per default this is activated for all players. This can be changed in config-file by setting Use Permissions to 'true'. The check for sleeping on top of foundation can be activated with "Required to sleep ON foundation > true". After a change run in console 'reload SleeperAnimalProtection'.
Permissions
This plugin uses the permission...