Fixed invincible attack dogs.

Fix:  When vanilla PvP is on, but GP config says it's off in a world,
dogs are invincible even though they can attack players.
This commit is contained in:
ryanhamshire 2015-09-14 20:06:49 -07:00
parent 1d4ce2f9ee
commit 2182216499

View File

@ -824,7 +824,7 @@ public class EntityEventHandler implements Listener
}
//otherwise the player damaging the entity must have permission, unless it's a dog in a pvp world
else if(!(GriefPrevention.instance.pvpRulesApply(event.getEntity().getWorld()) && event.getEntity().getType() == EntityType.WOLF))
else if(!(event.getEntity().getWorld().getPVP() && event.getEntity().getType() == EntityType.WOLF))
{
String noContainersReason = claim.allowContainers(attacker);
if(noContainersReason != null)