diff --git a/src/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java b/src/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java index 40577287..5816f342 100644 --- a/src/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java +++ b/src/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java @@ -150,8 +150,14 @@ public class InventoryListener implements Listener { final Player player = (Player) event.getWhoClicked(); // Illegal enchantments hotfixes - if (Items.checkIllegalEnchantments(player, event.getCurrentItem())) event.setCancelled(true); - if (Items.checkIllegalEnchantments(player, event.getCursor())) event.setCancelled(true); + try{ + if (Items.checkIllegalEnchantments(player, event.getCurrentItem())) event.setCancelled(true); + } + catch(final ArrayIndexOutOfBoundsException e){} // Hotfix + try{ + if (Items.checkIllegalEnchantments(player, event.getCursor())) event.setCancelled(true); + } + catch(final ArrayIndexOutOfBoundsException e){} // Hotfix // Fast inventory manipulation check. if (fastClick.isEnabled(player)){