Fixed ender crystals damaging protected animals.

This commit is contained in:
ryanhamshire 2016-03-20 13:51:19 -07:00
parent ab8b18ec35
commit 110f4e2009

View File

@ -817,7 +817,13 @@ public class EntityEventHandler implements Listener
PlayerData playerData = null; PlayerData playerData = null;
//if not a player or an explosive, allow //if not a player or an explosive, allow
if(attacker == null && damageSource != null && !(damageSource instanceof Projectile) && damageSource.getType() != EntityType.CREEPER && !(damageSource instanceof Explosive) && !(damageSource instanceof ExplosiveMinecart)) if(attacker == null
&& damageSource != null
&& damageSource.getType() != EntityType.CREEPER
&& damageSource.getType() != EntityType.ENDER_CRYSTAL
&& !(damageSource instanceof Projectile)
&& !(damageSource instanceof Explosive)
&& !(damageSource instanceof ExplosiveMinecart))
{ {
return; return;
} }