From 2039f719c64274b859ecbc233e1efb0610421480 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Thu, 1 Mar 2012 18:33:07 +0100 Subject: [PATCH] R6 (aka R5) optimizations --- .../minecraft/limitedcreative/listeners/LimitListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java index cd17000..14139d1 100644 --- a/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java +++ b/src/de/jaschastarke/minecraft/limitedcreative/listeners/LimitListener.java @@ -23,7 +23,6 @@ import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; -import org.bukkit.block.ContainerBlock; import org.bukkit.block.Sign; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -44,6 +43,7 @@ import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerPickupItemEvent; +import org.bukkit.inventory.InventoryHolder; import org.bukkit.material.Button; import org.bukkit.material.Lever; @@ -90,7 +90,7 @@ public class LimitListener implements Listener { Block block = event.getClickedBlock(); - if (block.getState() instanceof ContainerBlock) { + if (block.getState() instanceof InventoryHolder) { player.onChestAccess(event); } else if (block.getState() instanceof Sign) { player.onSignAccess(event);