1
0
mirror of https://e.coding.net/circlecloud/SimpleEssential.git synced 2024-11-17 01:18:47 +00:00

fix InvListen Null...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-08-23 22:00:43 +08:00
parent 11bb746e62
commit cfae16c46f

View File

@ -36,7 +36,7 @@ public class PlayerInventoryViewListen implements Listener {
Inventory inv = e.getInventory();
if (inv.getType() == InventoryType.ENCHANTING) {
ItemStack item = e.getInventory().getContents()[0];
if (item.getType() != Material.AIR) {
if (item != null && item.getType() != Material.AIR) {
player.getInventory().addItem(item);
}
plugin.invcontrol.clearEnchantBench(player);