From f8888f5c9ff4ed6767ccc9308c35ce73cc5add02 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Fri, 15 Jan 2016 01:30:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF=20?= =?UTF-8?q?=E6=8B=A6=E6=88=AAError...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- pom.xml | 2 +- .../java/org/maxgamer/QuickShop/Config/ConfigManager.java | 2 +- .../java/org/maxgamer/QuickShop/Shop/ContainerShop.java | 3 --- src/main/java/org/maxgamer/QuickShop/Shop/FakeItem.java | 8 +------- .../java/org/maxgamer/QuickShop/Shop/ShopManager.java | 8 +++----- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 12d53bf..571d1e7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.maxgamer QuickShop - 1.8 + 1.8.1 快捷商店重置版本... ${project.name} diff --git a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java index 10d3742..63f4cb1 100644 --- a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java +++ b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java @@ -89,7 +89,7 @@ public class ConfigManager { FakeItem.register(plugin); plugin.getLogger().info("虚拟悬浮物功能测试正常..."); fakeItem = true; - } catch (final Exception e) { + } catch (final Error | Exception e) { plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("| 警告: 虚拟物品启动失败 使用原版悬浮物品..."); plugin.getLogger().warning("+========================================="); diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java index b46fd27..7e3df86 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java @@ -702,9 +702,6 @@ public class ContainerShop implements Shop { disItem.remove(); return; } - if (disItem instanceof FakeItem) { - return; - } if (disItem.getItem() == null) { disItem.removeDupe(); disItem.spawn(); diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/FakeItem.java b/src/main/java/org/maxgamer/QuickShop/Shop/FakeItem.java index 33c0c75..a2f3d8d 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/FakeItem.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/FakeItem.java @@ -122,13 +122,7 @@ public class FakeItem implements DisplayItem { public FakeItem(final ContainerShop containerShop, final ItemStack item) { this.itemStack = item; - this.location = containerShop.getLocation().clone().add(0.5, 1.2, 0.5); - this.eid = getFakeEntityId(); - } - - public FakeItem(final ItemStack itemStack, final Location loc) { - this.itemStack = itemStack; - this.location = loc; + this.location = containerShop.getLocation().clone().add(0.5, 1, 0.5); this.eid = getFakeEntityId(); } diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java b/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java index 5996a9d..d33941c 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/ShopManager.java @@ -304,11 +304,9 @@ public class ShopManager { final BlockFace bf = info.getLocation().getBlock().getFace(info.getSignBlock()); bs.setType(Material.WALL_SIGN); final Sign sign = (Sign) bs.getData(); - if (sign != null && bf != null) { - sign.setFacingDirection(bf); - bs.update(true); - shop.setSignText(); - } + sign.setFacingDirection(bf); + bs.update(true); + shop.setSignText(); } if (shop instanceof ContainerShop) { final ContainerShop cs = (ContainerShop) shop;