Animals not working right

thank you for the explanation that cleared a lot up. so if defaultallowdamage is set to false but say a rule that traps can hurt players then there is no pvp but if a player say wanders into an open base that has a shotgun trap the trap will still kill the player. and if npcs can hurt players then all npcs can hurt players even animals? in the entity group for npc there are no animals

yes except anything can hurt players rule allows animals to hurt players and not the npc group

ok thank you so much again