From 30e0954f0d0c606b5cb64e8ec70992fa00b80960 Mon Sep 17 00:00:00 2001 From: Brianna O'Keefe Date: Wed, 5 Dec 2018 04:30:59 -0500 Subject: [PATCH] fix for confusion between top and bottom guis. --- .../java/com/songoda/ultimatekits/utils/gui/AbstractGUI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/songoda/ultimatekits/utils/gui/AbstractGUI.java b/src/main/java/com/songoda/ultimatekits/utils/gui/AbstractGUI.java index 89afbbd..f2036f0 100644 --- a/src/main/java/com/songoda/ultimatekits/utils/gui/AbstractGUI.java +++ b/src/main/java/com/songoda/ultimatekits/utils/gui/AbstractGUI.java @@ -74,12 +74,12 @@ public abstract class AbstractGUI implements Listener { } } } - + Map entries = new HashMap<>(gui.clickables); for (Map.Entry entry : entries.entrySet()) { Range range = entry.getKey(); - if (!range.isBottom() && bottom || range.getClickType() != null && range.getClickType() != event.getClick()) + if (range.isBottom() && !bottom || !range.isBottom() && bottom || range.getClickType() != null && range.getClickType() != event.getClick()) continue; if (event.getSlot() >= range.getMin() && event.getSlot() <= range.getMax()) { entry.getValue().Clickable(player, inventory, event.getCursor(), event.getSlot(), event.getClick());