From 372155b5c3f1ffe948bf8272670d733f9b829508 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 16 Jan 2015 14:20:01 -0800 Subject: [PATCH] Don't check player inventories for protection. Fixes WORLDGUARD-3309, WORLDGUARD-3310. --- .../worldguard/bukkit/listener/EventAbstractionListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java b/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java index 04d63ede..5d2c5ca7 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java @@ -702,7 +702,9 @@ 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) { - Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder)); + if (!(holder instanceof Player)) { + Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder)); + } } }