From aac5685a09262b006fa47d140c4f8d3fb96d7a2b Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Tue, 4 Jun 2019 09:14:42 +0800 Subject: [PATCH] Fixed QUICKSHOP-B in sentry Former-commit-id: 96d252b8597c56e5a737212a24595b5c136503cf [formerly a8e416f23f38c8db562a4e0576bf3f14166b0d1b] Former-commit-id: f8b459724e015cf352c79acec96e26c29207509d --- .../java/org/maxgamer/quickshop/Shop/ContainerShop.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java index 88ad01477..e737739f9 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java @@ -257,7 +257,9 @@ public class ContainerShop implements Shop { container = (InventoryHolder) this.loc.getBlock().getState(); return container.getInventory(); } catch (Exception e) { - throw new IllegalStateException("Inventory doesn't exist anymore: " + this); + this.onUnload(); + this.delete(); + throw new IllegalStateException("Inventory doesn't exist anymore: " + this + " shop was removed."); } } @@ -522,11 +524,6 @@ public class ContainerShop implements Shop { public void setSignText() { if (Util.isLoaded(this.getLocation()) == false) return; - if (!Util.canBeShop(this.getLocation().getBlock())) { - this.onUnload(); - this.delete(); - Util.debugLog("We are removed a shop cause it nolonger had InventoryHolder."); - } String[] lines = new String[4]; lines[0] = MsgUtil.getMessage("signs.header", this.ownerName()); if (this.isSelling()) {