From cfae16c46faba369e2304c48fe8b4cba7b86063e Mon Sep 17 00:00:00 2001 From: j502647092 Date: Sun, 23 Aug 2015 22:00:43 +0800 Subject: [PATCH] fix InvListen Null... Signed-off-by: j502647092 --- .../SimpleEssential/listen/PlayerInventoryViewListen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java b/src/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java index 89a0442..936baff 100644 --- a/src/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java +++ b/src/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java @@ -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);