From 580afb014dd7cdf175cc5555b18bb9bdace919c9 Mon Sep 17 00:00:00 2001 From: Steffion Date: Sun, 25 Aug 2013 19:50:42 +0200 Subject: [PATCH] * Fixed bug being unable to put in Blocks when using Chest commands. --- .../Listeners/OnInventoryClickEvent.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java b/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java index c5a2c54..460039e 100644 --- a/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java +++ b/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java @@ -33,18 +33,17 @@ public class OnInventoryClickEvent implements Listener { Inventory inv = event.getInventory(); if (inv.getType().equals(InventoryType.CHEST)) { - if (inv.getName().startsWith("\u00A7r")) { - if (inv.getName().contains("DisguiseBlocks")) { - if (event.getCurrentItem() != null) { - if (!event.getCurrentItem().getType().isBlock()) { - event.setCancelled(true); - MessageM.sendFMessage(player, - ConfigC.error_setNotABlock, true); - } + if (inv.getName().contains("DisguiseBlocks")) { + if (event.getCurrentItem() != null) { + if (!event.getCurrentItem().getType().isBlock()) { + event.setCancelled(true); + MessageM.sendFMessage(player, + ConfigC.error_setNotABlock, true); } - - return; } + + return; + } else if (inv.getName().startsWith("\u00A7r")) { event.setCancelled(true); ItemStack item = event.getCurrentItem(); String arenaname = inv