mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-02 16:49:34 +01:00
fix for confusion between top and bottom guis.
This commit is contained in:
parent
c39e3dbbaf
commit
30e0954f0d
@ -74,12 +74,12 @@ public abstract class AbstractGUI implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Map<Range, Clickable> entries = new HashMap<>(gui.clickables);
|
||||
|
||||
for (Map.Entry<Range, Clickable> 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());
|
||||
|
Loading…
Reference in New Issue
Block a user