From 9dce41aa30a2f28ea3ae9f9ea33feb98ee71c635 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sun, 20 Dec 2020 14:50:57 +0100 Subject: [PATCH] Work around internal issue with ender chests At the moment they can't be shops anyways so this shouldn't have any impact. --- .../ChestShop/Listeners/Modules/StockCounterModule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/StockCounterModule.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/StockCounterModule.java index 9bb86ca..8490a66 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/StockCounterModule.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/StockCounterModule.java @@ -16,6 +16,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; 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; @@ -65,7 +66,7 @@ public class StockCounterModule implements Listener { @EventHandler public static void onInventoryClose(InventoryCloseEvent event) { - if (event.getInventory().getLocation() == null || !ChestShopSign.isShopBlock(event.getInventory().getLocation().getBlock())) { + if (event.getInventory().getType() == InventoryType.ENDER_CHEST || event.getInventory().getLocation() == null || !ChestShopSign.isShopBlock(event.getInventory().getLocation().getBlock())) { return; }