Fixed button that shouldnt be enabled.

This commit is contained in:
Brianna 2019-06-10 19:01:41 -04:00
parent c89bb9ad98
commit d2ac2ea5da

View File

@ -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