From b28384814c5ed0f196de1fe25374da622bba2fb2 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Mon, 24 Aug 2015 13:38:44 +0800 Subject: [PATCH] remove add item to inv while close enchantbench... Signed-off-by: 502647092 --- .../SimpleEssential/listen/PlayerInventoryViewListen.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java b/src/main/java/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java index 936baff..faad633 100644 --- a/src/main/java/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java +++ b/src/main/java/cn/citycraft/SimpleEssential/listen/PlayerInventoryViewListen.java @@ -3,7 +3,6 @@ */ package cn.citycraft.SimpleEssential.listen; -import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -11,7 +10,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; import cn.citycraft.SimpleEssential.SimpleEssential; @@ -35,10 +33,6 @@ public class PlayerInventoryViewListen implements Listener { Player player = (Player) e.getPlayer(); Inventory inv = e.getInventory(); if (inv.getType() == InventoryType.ENCHANTING) { - ItemStack item = e.getInventory().getContents()[0]; - if (item != null && item.getType() != Material.AIR) { - player.getInventory().addItem(item); - } plugin.invcontrol.clearEnchantBench(player); } }