diff --git a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java index 019fc1e..99ec0c7 100644 --- a/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java +++ b/src/main/java/pw/kaboom/extras/modules/player/PlayerConnection.java @@ -42,10 +42,8 @@ class PlayerConnection implements Listener { @EventHandler void onInventoryClose(InventoryCloseEvent event) { - for (int i = 0; i < 64; i++) { - //for (ItemStack item : event.getInventory().getContents()) { - System.out.println(event.getInventory().getItem(i)); - if (EntitySpawn.isIllegalItem(event.getInventory().getItem(i))) { + for (ItemStack item : event.getInventory().getContents()) { + if (EntitySpawn.isIllegalItem(item)) { event.getInventory().clear(); } }