Sheep can't be dyed or sheared without permission.
Note: The client will still update the sheep color even when the event is cancelled. Reconnecting to the server or shearing the sheep (with /ignoreclaims) will prove the sheep was not actually dyed.
This commit is contained in:
parent
78d0d8224e
commit
00fbb0f257
|
|
@ -818,9 +818,15 @@ class PlayerEventHandler implements Listener
|
|||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if the entity is an animal, apply container rules
|
||||
else if(entity instanceof Animals)
|
||||
if(GriefPrevention.instance.config_claims_preventTheft && entity instanceof Animals)
|
||||
{
|
||||
//if the entity is in a claim
|
||||
Claim claim = this.dataStore.getClaimAt(entity.getLocation(), false, null);
|
||||
if(claim != null)
|
||||
{
|
||||
if(claim.allowContainers(player) != null)
|
||||
{
|
||||
|
|
@ -832,7 +838,6 @@ class PlayerEventHandler implements Listener
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if preventing theft, prevent leashing claimed creatures
|
||||
if(GriefPrevention.instance.config_claims_preventTheft && entity instanceof Creature && player.getItemInHand().getType() == Material.LEASH)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user