mirror of
https://e.coding.net/circlecloud/SimpleEssential.git
synced 2025-01-06 12:18:56 +00:00
remove add item to inv while close enchantbench...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
1b9b4f6dc8
commit
b28384814c
@ -3,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package cn.citycraft.SimpleEssential.listen;
|
package cn.citycraft.SimpleEssential.listen;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
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.InventoryCloseEvent;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import cn.citycraft.SimpleEssential.SimpleEssential;
|
import cn.citycraft.SimpleEssential.SimpleEssential;
|
||||||
|
|
||||||
@ -35,10 +33,6 @@ public class PlayerInventoryViewListen implements Listener {
|
|||||||
Player player = (Player) e.getPlayer();
|
Player player = (Player) e.getPlayer();
|
||||||
Inventory inv = e.getInventory();
|
Inventory inv = e.getInventory();
|
||||||
if (inv.getType() == InventoryType.ENCHANTING) {
|
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);
|
plugin.invcontrol.clearEnchantBench(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user