1
0
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:
502647092 2015-11-03 20:37:14 +08:00
parent aec031f916
commit cd091d4df3

View File

@ -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) {
}
}
}
}
}