Fix error when closing if player had another inventory open (not the gui)

This commit is contained in:
Teriuihi 2023-09-24 04:33:15 +02:00
parent 94158019bc
commit e77485ea68

View File

@ -47,7 +47,8 @@ public class GUIListener implements Listener {
public void onClose(InventoryCloseEvent event) {
HumanEntity player = event.getPlayer();
GUI gui = GUI.GUIByUUID.get(player.getUniqueId());
if (gui == null)
return;
gui.closed();
GUI.GUIByUUID.remove(event.getPlayer().getUniqueId());