Previously, only the onClose callback checked if the inventory closed was the correct one. However, it called deleteInstance on every InventoryCloseEvent, which caused an issue with GUIPageBuilder#changeGUI (#64). This was because the InventoryCloseEvent was triggered after the GUI changed, leading to the unregistration of the newly opened GUI instead of the old one.
Previously, only the
onClose
callback checked if the inventory closed was the correct one. However, it calleddeleteInstance
on every InventoryCloseEvent, which caused an issue withGUIPageBuilder#changeGUI
(#64). This was because the InventoryCloseEvent was triggered after the GUI changed, leading to the unregistration of the newly opened GUI instead of the old one.(also removed an unused import in KColors)