Fixed ender crystals damaging protected animals.
This commit is contained in:
parent
ab8b18ec35
commit
110f4e2009
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user