diff --git a/src/main/java/com/nukkitx/fakeinventories/inventory/FakeInventory.java b/src/main/java/com/nukkitx/fakeinventories/inventory/FakeInventory.java index 1de969e..60fc866 100644 --- a/src/main/java/com/nukkitx/fakeinventories/inventory/FakeInventory.java +++ b/src/main/java/com/nukkitx/fakeinventories/inventory/FakeInventory.java @@ -78,7 +78,10 @@ public void onClose(Player who) { super.onClose(who); open.remove(who, this); - List blocks = blockPositions.get(who); + List blocks = blockPositions.remove(who); + if (blocks == null) { + return; + } for (int i = 0, size = blocks.size(); i < size; i++) { final int index = i;