From d2ac2ea5daf905ad00624689a337405493e09306 Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 10 Jun 2019 19:01:41 -0400 Subject: [PATCH] Fixed button that shouldnt be enabled. --- .../songoda/ultimatekits/gui/GUIDisplayKit.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/songoda/ultimatekits/gui/GUIDisplayKit.java b/src/main/java/com/songoda/ultimatekits/gui/GUIDisplayKit.java index c1cafd6..e2bedf7 100644 --- a/src/main/java/com/songoda/ultimatekits/gui/GUIDisplayKit.java +++ b/src/main/java/com/songoda/ultimatekits/gui/GUIDisplayKit.java @@ -149,6 +149,13 @@ public class GUIDisplayKit extends AbstractGUI { linkmeta.setLore(lore); link.setItemMeta(linkmeta); inventory.setItem(max - 5, link); + + registerClickable(max - 5, ((player1, inventory1, cursor, slot, type) -> { + player.closeInventory(); + String kitName = kit.getName(); + Kit kit = plugin.getKitManager().getKit(kitName); + kit.buy(player); + })); } for (ItemStack is : list) { @@ -218,13 +225,6 @@ public class GUIDisplayKit extends AbstractGUI { registerClickable(8, (player, inventory, cursor, slot, type) -> player.closeInventory()); - registerClickable(max - 5, ((player1, inventory1, cursor, slot, type) -> { - player.closeInventory(); - String kitName = kit.getName(); - Kit kit = plugin.getKitManager().getKit(kitName); - kit.buy(player); - })); - } @Override