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