From 2d7ee66bce47c88a22c8a38a8fdd571f2467ccde Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Tue, 18 Jun 2019 09:16:42 +0800 Subject: [PATCH] Fix must have 2 AIR above the chest to spawn the display Former-commit-id: 22be0a50606191e06ebbf5fb138de04e876b815b [formerly c9df245874896b090245f9ccf44f6cbae3d30c34] Former-commit-id: 5df20d5c043dee3eaa3c99990b0dad821e2c7c84 --- src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java | 2 +- src/main/java/org/maxgamer/quickshop/Util/Util.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java index 07b6be550..23c21273e 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/RealDisplayItem.java @@ -49,7 +49,7 @@ public class RealDisplayItem implements DisplayItem { Util.debugLog(trace.getClassName() + "#" + trace.getMethodName() + "#" + trace.getLineNumber()); } } - if (!Util.isAir(getDisplayLocation().add(0, 1, 0).getBlock().getType())) { + if (!Util.isAir(getDisplayLocation().getBlock().getType())) { Util.debugLog("Can't spawn the displayItem because there is not an AIR block above the shopblock."); return; } diff --git a/src/main/java/org/maxgamer/quickshop/Util/Util.java b/src/main/java/org/maxgamer/quickshop/Util/Util.java index a2063a3bc..ba274243a 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/Util.java +++ b/src/main/java/org/maxgamer/quickshop/Util/Util.java @@ -974,7 +974,7 @@ public class Util { if (mat == Material.VOID_AIR) return true; } catch (Throwable t) { - return false; + //ignore } return false; }