Fixed invincible guard dogs.

In PvP worlds, while in land claims, dogs could attack players but not
be damaged in return.  Now pet dogs are not protected in PvP-world land
claims.  Other types of pets are still protected as long as they're
inside a land claim where the attacker doesn't have sufficient
permission.
This commit is contained in:
ryanhamshire 2015-06-27 09:34:34 -07:00
parent 8bd39580f6
commit 2b04da4b25

View File

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