diff --git a/src/main/java/eu/pb4/sgui/api/gui/HotbarGui.java b/src/main/java/eu/pb4/sgui/api/gui/HotbarGui.java index c0da894..5e2375e 100644 --- a/src/main/java/eu/pb4/sgui/api/gui/HotbarGui.java +++ b/src/main/java/eu/pb4/sgui/api/gui/HotbarGui.java @@ -101,7 +101,10 @@ public void clearSlot(int index) { @Override public boolean click(int index, ClickType type, SlotActionType action) { - return super.click(VANILLA_TO_GUI_IDS[index], type, action); + if (index >= 0 && index < SIZE) { + return super.click(VANILLA_TO_GUI_IDS[index], type, action); + } + return super.click(index, type, action); } @Override