Bug: WorldGuard animal Overcrowding incompatibility
GrandeMalum opened this issue ยท 5 comments
Hello. I found a bug. When animals overcrowding in some ones WG region they don't die. I think thats happens cause of 1 option in plugin WorldGuard that called "No animal damage in region". Please, fix this.
If Worldguard is canceling the damage, there's nothing we can do about this. Yes, we could try to override this via (needlessly) listening to the event and canceling if needed... but instead (the correct way) is to set your flags appropriately. There probably is a setting for not handling damage done by a "null" entity, I vaguely recall such in the WorldGuard config. Try toggling that.
But If I turn this flag off players could kill animals in other player region!
But If I turn this flag off
That's not what I said to do. Please re-read my comment.
WG is really popular plugin. I think you should add compatibility.
Bypassing its protection is a poor way to add compatibility. It's likely protecting all animals from all damage. Again, see its config to allow damage from "null" sources or plugins.
Ok, I took a look through the source: https://github.com/MLG-Fortress/ExtraHardMode/blob/master/src/main/java/com/extrahardmode/features/AnimalCrowdControl.java#L126
When we damage animals, we claim that the animal themselves are the damagers (which somewhat makes sense, since they are "suffocating." This makes it easy for logging plugins to determine if the animal "killed" (suffocated) themselves if they happen to die due to this.
I'll try removing the source, and see if that will bypass WorldGuard for you. However, depending on how WorldGuard is implementing their animal protection - this might not work.