mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
改名物品扩展显示原版物品名称...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
2397e33d35
commit
1934b5748c
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.maxgamer</groupId>
|
||||
<artifactId>QuickShop</artifactId>
|
||||
<version>1.6.6.1</version>
|
||||
<version>1.6.7</version>
|
||||
<description>快捷商店重置版本...</description>
|
||||
<build>
|
||||
<finalName>${project.name}</finalName>
|
||||
@ -55,7 +55,7 @@
|
||||
<properties>
|
||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||
<env.BUILD_NUMBER>DEBUG</env.BUILD_NUMBER>
|
||||
<update.description>&c修复异步载入商店信息未刷新的问题...</update.description>
|
||||
<update.description>&c改名物品扩展显示原版物品名称(熊孩子防不胜防)...</update.description>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<repositories>
|
||||
|
@ -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<Shop> shops = shopManager.getShopIterator();
|
||||
while (shops.hasNext()) {
|
||||
shops.next().onClick();
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
error++;
|
||||
}
|
||||
getLogger().info("本地化工具载入完成 刷新汉化信息...");
|
||||
final Iterator<Shop> shops = shopManager.getShopIterator();
|
||||
while (shops.hasNext()) {
|
||||
shops.next().onClick();
|
||||
if (error != 0) {
|
||||
getLogger().info("信息刷新完成 期间发生 " + error + " 个错误 已忽略(不是BUG 无需反馈)...");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user