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

remove add item to inv while close enchantbench...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-08-24 13:38:44 +08:00
parent 1b9b4f6dc8
commit b28384814c

View File

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