diff --git a/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java b/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java index 53a0574..3d8fa67 100644 --- a/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java +++ b/src/nl/Steffion/BlockHunt/Listeners/OnInventoryClickEvent.java @@ -89,13 +89,15 @@ public class OnInventoryClickEvent implements Listener { MessageM.replaceAll((String) W.config .get(ConfigC.shop_blockChooserName)))) { event.setCancelled(true); - W.choosenBlock.put(player, event.getCurrentItem()); - MessageM.sendFMessage(player, - ConfigC.normal_ShopChoosenBlock, true, "block-" - + event.getCurrentItem().getType() - .toString().replaceAll("_", "") - .replaceAll("BLOCK", "") - .toLowerCase()); + if (event.getCurrentItem().getType() != Material.AIR) { + W.choosenBlock.put(player, event.getCurrentItem()); + MessageM.sendFMessage(player, + ConfigC.normal_ShopChoosenBlock, true, "block-" + + event.getCurrentItem().getType() + .toString().replaceAll("_", "") + .replaceAll("BLOCK", "") + .toLowerCase()); + } } else { event.setCancelled(true); ItemStack item = event.getCurrentItem();