mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2025-10-02 12:37:27 +00:00
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user