Fix error when closing if player had another inventory open (not the gui)
This commit is contained in:
parent
94158019bc
commit
e77485ea68
|
|
@ -47,7 +47,8 @@ public class GUIListener implements Listener {
|
||||||
public void onClose(InventoryCloseEvent event) {
|
public void onClose(InventoryCloseEvent event) {
|
||||||
HumanEntity player = event.getPlayer();
|
HumanEntity player = event.getPlayer();
|
||||||
GUI gui = GUI.GUIByUUID.get(player.getUniqueId());
|
GUI gui = GUI.GUIByUUID.get(player.getUniqueId());
|
||||||
|
if (gui == null)
|
||||||
|
return;
|
||||||
gui.closed();
|
gui.closed();
|
||||||
|
|
||||||
GUI.GUIByUUID.remove(event.getPlayer().getUniqueId());
|
GUI.GUIByUUID.remove(event.getPlayer().getUniqueId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user