From b3d90503bbd922813cd0e645c398fb65b468d43b Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Tue, 27 Jul 2021 23:48:54 +0800 Subject: [PATCH] Fix more build errors --- src/main/java/org/maxgamer/quickshop/QuickShop.java | 6 ------ .../org/maxgamer/quickshop/shop/ContainerShop.java | 11 +++-------- .../org/maxgamer/quickshop/shop/RealDisplayItem.java | 6 ++---- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index aec3b299b..c18a5e7c4 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -646,8 +646,6 @@ public class QuickShop extends JavaPlugin { this.updateWatcher.uninit(); } - AsyncPacketSender.stop(); - Util.debugLog("Cleanup tasks..."); try { @@ -871,10 +869,6 @@ public class QuickShop extends JavaPlugin { displayDupeRemoverWatcher = new DisplayDupeRemoverWatcher(); timerTaskList.add(displayDupeRemoverWatcher.runTaskTimerAsynchronously(this, 0, 1)); } - if (display && DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) { - AsyncPacketSender.start(this); - } - /* Load all shops. */ shopLoader = new ShopLoader(this); shopLoader.loadShops(); diff --git a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java index 29b149ea0..1479aef13 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java @@ -164,23 +164,18 @@ public class ContainerShop implements Shop { private void initDisplayItem() { Util.ensureThread(false); if (plugin.isDisplay()) { + Chunk chunk = getLocation().getChunk(); switch (DisplayItem.getNowUsing()) { - case UNKNOWN: - Util.debugLog( - "Failed to create a ContainerShop displayItem, the type is unknown, fallback to RealDisplayItem"); - this.displayItem = new RealDisplayItem(this); - break; case REALITEM: - this.displayItem = new RealDisplayItem(this); + this.displayItem = new RealDisplayItem(this, chunk.getWorld().getName(), chunk.getX(), chunk.getX()); break; case VIRTUALITEM: - Chunk chunk = getLocation().getChunk(); this.displayItem = new VirtualDisplayItem(this, chunk.getWorld().getName(), chunk.getX(), chunk.getX()); break; default: Util.debugLog( "Warning: Failed to create a ContainerShop displayItem, the type we didn't know, fallback to RealDisplayItem"); - this.displayItem = new RealDisplayItem(this); + this.displayItem = new RealDisplayItem(this, chunk.getWorld().getName(), chunk.getX(), chunk.getX()); break; } } diff --git a/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java b/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java index 58dd304d7..45f875f21 100644 --- a/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/shop/RealDisplayItem.java @@ -49,10 +49,8 @@ public class RealDisplayItem extends DisplayItem { * * @param shop The shop (See Shop) */ - RealDisplayItem(@NotNull Shop shop) { - - super(shop); - + RealDisplayItem(@NotNull Shop shop, @NotNull String worldName, int chunkX, int chunkZ) { + super(shop, worldName, chunkX, chunkZ); // this.displayLoc = shop.getLocation().clone().add(0.5, 1.2, 0.5); }