mirror of
https://e.coding.net/circlecloud/ProtectItem.git
synced 2024-12-27 20:48:51 +00:00
fix AIOOBE...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
aec031f916
commit
cd091d4df3
@ -23,14 +23,14 @@ public class ClickItemListen implements Listener {
|
||||
final Player p = (Player) e.getWhoClicked();
|
||||
final Inventory inv = e.getInventory();
|
||||
final int solt = e.getSlot();
|
||||
try {
|
||||
final ItemStack i = inv.getItem(solt);
|
||||
if (i != null && i.getType() != Material.AIR) {
|
||||
if (plugin.isCantAction(p, i, ActionType.Click)) {
|
||||
try {
|
||||
inv.setItem(solt, new ItemStack(Material.AIR));
|
||||
}
|
||||
}
|
||||
} catch (final Exception e2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user