From bd46c152086e9becd6a9cdeffd2c64d828a7db7f Mon Sep 17 00:00:00 2001 From: sky Date: Tue, 3 Dec 2019 21:39:58 +0800 Subject: [PATCH] + fix MenuStored --- .../izzel/taboolib/util/item/inventory/stored/MenuStored.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/io/izzel/taboolib/util/item/inventory/stored/MenuStored.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/stored/MenuStored.java index 24674a3..1cdc954 100644 --- a/src/main/scala/io/izzel/taboolib/util/item/inventory/stored/MenuStored.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/stored/MenuStored.java @@ -62,7 +62,7 @@ public abstract class MenuStored { } // 手动装填 else { - Action action = null; + Action action; if (e.castClick().getClick().isShiftClick() && e.getRawSlot() >= 0 && e.getRawSlot() < e.getInventory().getSize()) { action = new ActionQuickTake(); } else if (e.castClick().getClick() == org.bukkit.event.inventory.ClickType.NUMBER_KEY) { @@ -74,7 +74,7 @@ public abstract class MenuStored { if (isIntoSlot(e.getInventory(), action.getCurrent(e), action.getCurrentSlot(e))) { e.setCancelled(true); // 提取动作 - if (Items.isNull(action.getCurrent(e)) && !existsItem(e.getInventory(), action.getCurrentSlot(e))) { + if (Items.isNull(action.getCurrent(e)) && existsItem(e.getInventory(), action.getCurrentSlot(e))) { // 提取物品 action.setCurrent(e, getItem(e.getInventory(), action.getCurrentSlot(e))); // 删除物品