diff --git a/pom.xml b/pom.xml
index ba44789..b7de5fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.maxgamer
QuickShop
- 1.6.6.1
+ 1.6.7
快捷商店重置版本...
${project.name}
@@ -55,7 +55,7 @@
http://ci.citycraft.cn:8080
DEBUG
- &c修复异步载入商店信息未刷新的问题...
+ &c改名物品扩展显示原版物品名称(熊孩子防不胜防)...
UTF-8
diff --git a/src/main/java/org/maxgamer/QuickShop/QuickShop.java b/src/main/java/org/maxgamer/QuickShop/QuickShop.java
index 1b4fc3b..8e6fd6d 100644
--- a/src/main/java/org/maxgamer/QuickShop/QuickShop.java
+++ b/src/main/java/org/maxgamer/QuickShop/QuickShop.java
@@ -156,16 +156,24 @@ public class QuickShop extends JavaPlugin {
this.getServer().getScheduler().runTaskAsynchronously(this, new Runnable() {
@Override
public void run() {
- while (!LocalUtil.isInit()) {
- try {
- Thread.sleep(500);
- } catch (final InterruptedException e) {
+ int error = 0;
+ try {
+ while (!LocalUtil.isInit()) {
+ try {
+ Thread.sleep(500);
+ } catch (final InterruptedException e) {
+ }
}
+ getLogger().info("本地化工具载入完成 刷新汉化信息...");
+ final Iterator shops = shopManager.getShopIterator();
+ while (shops.hasNext()) {
+ shops.next().onClick();
+ }
+ } catch (final Exception e) {
+ error++;
}
- getLogger().info("本地化工具载入完成 刷新汉化信息...");
- final Iterator shops = shopManager.getShopIterator();
- while (shops.hasNext()) {
- shops.next().onClick();
+ if (error != 0) {
+ getLogger().info("信息刷新完成 期间发生 " + error + " 个错误 已忽略(不是BUG 无需反馈)...");
}
}
});
diff --git a/src/main/java/org/maxgamer/QuickShop/Util/Util.java b/src/main/java/org/maxgamer/QuickShop/Util/Util.java
index 027e90a..798fac2 100644
--- a/src/main/java/org/maxgamer/QuickShop/Util/Util.java
+++ b/src/main/java/org/maxgamer/QuickShop/Util/Util.java
@@ -162,16 +162,13 @@ public class Util {
* @return The human readable item name.
*/
public static String getName(final ItemStack i) {
- // final String vanillaName = getDataName(i.getType(), i.getDurability());
- final String vanillaName = LocalUtil.getItemName(i);
+ final String vanillaName = LocalUtil.getItemFullName(i);
return vanillaName;
}
// Let's make very long names shorter for our sign
public static String getNameForSign(final ItemStack itemStack) {
- // final String name = getDataName(itemStack.getType(), itemStack.getDurability());
String name = getName(itemStack);
-
if (name.length() > 16) {
name = name.substring(0, 16);
}