From 9fce7de6b42c79f17804b6af7b4dd5e4ac23e240 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Thu, 21 Jul 2016 15:33:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=A8=E7=89=8C=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E8=A1=8C=E6=98=BE=E7=A4=BA=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84guititle=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- pom.xml | 4 ++-- .../maxgamer/QuickShop/Shop/ContainerShop.java | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 682179a..cf50440 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.maxgamer QuickShop - 1.9.2 + 1.9.3 快捷商店重置版本... ${project.name} @@ -60,9 +60,9 @@ DEBUG &a全新版本 &c虚拟悬浮物(橙子提供 对 就是那个汉化COI的逗比)&e7老板修复逗比BUG... + &b1.9.3 - &a木牌第一行显示配置文件的guititle内容...; &b1.9.2 - &c修复一个在删除商店时导致的报错...; &b1.9.1 - &c修复同一个玩家的商店直接漏洞不能传递的问题...; - &b1.9.0 - &c修复1.9开始以后不允许异步更新木牌的问题...; UTF-8 diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java index b021012..918caa3 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/ContainerShop.java @@ -5,8 +5,6 @@ import java.util.List; import java.util.Map; import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; @@ -22,14 +20,16 @@ import org.maxgamer.QuickShop.QuickShop; import org.maxgamer.QuickShop.Util.MsgUtil; import org.maxgamer.QuickShop.Util.Util; +import cn.citycraft.PluginHelper.kit.PKit; import cn.citycraft.PluginHelper.kit.PluginKit; public class ContainerShop implements Shop { + private final QuickShop plugin = (QuickShop) PKit.i(); + private final String signTitle = plugin.getConfigManager().getGuiTitle(); private DisplayItem displayItem; private final ItemStack item; private final Location loc; private String owner; - private final QuickShop plugin; private double price; private ShopType shopType; private boolean unlimited; @@ -52,7 +52,6 @@ public class ContainerShop implements Shop { this.price = price; this.owner = owner; this.item = item.clone(); - this.plugin = (QuickShop) Bukkit.getPluginManager().getPlugin("QuickShop"); this.item.setAmount(1); if (plugin.getConfigManager().isDisplay()) { if (plugin.getConfigManager().isFakeItem()) { @@ -69,7 +68,6 @@ public class ContainerShop implements Shop { this.shopType = s.shopType; this.item = s.item; this.loc = s.loc; - this.plugin = s.plugin; this.unlimited = s.unlimited; this.owner = s.owner; this.price = s.price; @@ -379,7 +377,7 @@ public class ContainerShop implements Shop { continue; } final Sign sign = (Sign) b.getState(); - if (sign.getLine(0).contains("[QuickShop]")) { + if (sign.getLine(0).contains("[QuickShop]") || sign.getLine(0).contains(signTitle)) { signs.add(sign); } else { boolean text = false; @@ -610,7 +608,7 @@ public class ContainerShop implements Shop { @Override public void run() { final String[] lines = new String[4]; - lines[0] = ChatColor.RED + "[QuickShop]"; + lines[0] = signTitle; if (shop.isBuying()) { final int remsp = shop.getRemainingSpace(); lines[1] = MsgUtil.p("signs.buying", "" + (remsp == 10000 ? "无限" : remsp)); @@ -659,8 +657,7 @@ public class ContainerShop implements Shop { @Override public String toString() { - final StringBuilder sb = new StringBuilder("商店 " + (loc.getWorld() == null ? "世界尚未载入" : "坐标: " + loc.getWorld().getName()) + "(" + loc.getBlockX() + ", " + loc.getBlockY() + ", " - + loc.getBlockZ() + ")"); + final StringBuilder sb = new StringBuilder("商店 " + (loc.getWorld() == null ? "世界尚未载入" : "坐标: " + loc.getWorld().getName()) + "(" + loc.getBlockX() + ", " + loc.getBlockY() + ", " + loc.getBlockZ() + ")"); sb.append(" 所有者: " + getOwner()); if (isUnlimited()) { sb.append(" 无限模式: true");