mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
Hotfix inventory click.
This commit is contained in:
parent
c146b8ca5d
commit
cb03c04420
@ -150,8 +150,14 @@ public class InventoryListener implements Listener {
|
||||
final Player player = (Player) event.getWhoClicked();
|
||||
|
||||
// Illegal enchantments hotfixes
|
||||
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)){
|
||||
|
Loading…
Reference in New Issue
Block a user