Allowing monsters to hurt claimed villagers.
This commit is contained in:
parent
e28bb8a8bd
commit
394a6b279d
|
|
@ -661,6 +661,12 @@ class EntityEventHandler implements Listener
|
||||||
//if attacker isn't a player, cancel
|
//if attacker isn't a player, cancel
|
||||||
if(attacker == null)
|
if(attacker == null)
|
||||||
{
|
{
|
||||||
|
//exception case
|
||||||
|
if(event.getEntity() instanceof Villager && damageSource != null && damageSource instanceof Monster)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user