Don't check player inventories for protection.

Fixes WORLDGUARD-3309, WORLDGUARD-3310.
This commit is contained in:
sk89q 2015-01-16 14:20:01 -08:00
parent 159de771bf
commit 372155b5c3

View File

@ -702,9 +702,11 @@ public void onInventoryOpen(InventoryOpenEvent event) {
if (holder instanceof BlockState) {
Events.fireToCancel(event, new UseBlockEvent(event, create(event.getPlayer()), ((BlockState) holder).getBlock()));
} else if (holder instanceof Entity) {
if (!(holder instanceof Player)) {
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
}
}
}
@EventHandler(ignoreCancelled = true)
public void onInventoryMoveItem(InventoryMoveItemEvent event) {