This commit is contained in:
NichtStudioCode 2022-09-25 22:32:14 +02:00
parent 1f77a50803
commit c315c360a2

@ -141,13 +141,14 @@ public class WindowManager implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
private void handleInventoryClose(InventoryCloseEvent event) {
Window window = getWindow(event.getInventory());
if (window != null) {
Player player = (Player) event.getPlayer();
Window window = getWindow(event.getInventory());
if (window != null)
window.handleClose(player);
openWindows.remove(player);
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
private void handleInventoryOpen(InventoryOpenEvent event) {