diff --git a/src/main/java/dev/felnull/bettergui/listener/GUIClickListener.java b/src/main/java/dev/felnull/bettergui/listener/GUIClickListener.java index 07aa14b..7fb5bdb 100644 --- a/src/main/java/dev/felnull/bettergui/listener/GUIClickListener.java +++ b/src/main/java/dev/felnull/bettergui/listener/GUIClickListener.java @@ -88,7 +88,7 @@ public void onClick(InventoryClickEvent e){ @EventHandler public void onClose(InventoryCloseEvent e){ - if(e.getInventory() != page.inventory) return; + if(e.getView().getTopInventory() != page.inventory) return; page.close(); } }