Allowing monsters to hurt claimed villagers.

This commit is contained in:
ryanhamshire 2015-03-02 20:15:37 -08:00
parent e28bb8a8bd
commit 394a6b279d

View File

@ -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;
} }