fix InvListen Null...

Signed-off-by: j502647092 <jtb1@163.com>
pull/2/MERGE
j502647092 2015-08-23 22:00:43 +08:00
parent 11bb746e62
commit cfae16c46f
1 changed files with 1 additions and 1 deletions

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);