mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-05 23:37:34 +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();
|
final Player player = (Player) event.getWhoClicked();
|
||||||
|
|
||||||
// Illegal enchantments hotfixes
|
// Illegal enchantments hotfixes
|
||||||
if (Items.checkIllegalEnchantments(player, event.getCurrentItem())) event.setCancelled(true);
|
try{
|
||||||
if (Items.checkIllegalEnchantments(player, event.getCursor())) event.setCancelled(true);
|
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.
|
// Fast inventory manipulation check.
|
||||||
if (fastClick.isEnabled(player)){
|
if (fastClick.isEnabled(player)){
|
||||||
|
Loading…
Reference in New Issue
Block a user