版本更新至 4.02

调整:部分语言文件地址拼写错误(FAIL写成FALL,我这鸟语算是白学了)
调整:配置文件 tlib.yml 不再监听文件更改(这块不是我写的,监听更改会出死循环不知道为啥)
调整:通过 MysqlUtils 创建的数据库连接会返回已存在的引用,不再重复创建
调整:TagManager 工具现在会根据玩家的前缀进行自动排序(尚未测试)
修复:ListenerPluginDisable 类中语言提示无法更改的问题
新增:几个奇葩数据库工具,我也不知道有啥用写着玩
This commit is contained in:
坏黑
2018-05-18 00:45:32 +08:00
parent 80fe84d0d4
commit 4aabd95c59
25 changed files with 720 additions and 102 deletions

View File

@@ -100,7 +100,7 @@ public class ItemUtils {
reloadItemCache();
itemdir = YamlConfiguration.loadConfiguration(new File(Main.getInst().getConfig().getString("DATAURL.ITEMDIR")));
} catch (Exception e) {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-ITEMS", e.toString());
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-ITEMS", e.toString());
}
}
@@ -108,7 +108,7 @@ public class ItemUtils {
FileConfiguration conf = ConfigUtils.load(Main.getInst(), file);
for (String name : conf.getConfigurationSection("").getKeys(false)) {
if (isExists(name)) {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-ITEMS", name);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-ITEMS", name);
} else if (finalFile) {
itemCachesFinal.put(name, loadItem(conf, name));
} else {
@@ -424,7 +424,7 @@ public class ItemUtils {
if (enchant != null) {
meta.addEnchant(enchant, section.getInt("enchants." + preEnchant), true);
} else {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-ENCHANTS", preEnchant);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-ENCHANTS", preEnchant);
}
}
}
@@ -435,7 +435,7 @@ public class ItemUtils {
if (flag != null) {
meta.addItemFlags(flag);
} else {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-FLAG", preFlag);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-FLAG", preFlag);
}
}
}
@@ -454,7 +454,7 @@ public class ItemUtils {
NumberUtils.getInteger(section.getString("potions." + prePotionName).split("-")[0]),
NumberUtils.getInteger(section.getString("potions." + prePotionName).split("-")[1]) - 1), true);
} else {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-POTION", prePotionName);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-POTION", prePotionName);
}
}
}
@@ -505,7 +505,7 @@ public class ItemUtils {
} catch (Exception ignored) {
}
} else {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-POTION", name);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-POTION", name);
}
}
}
@@ -544,7 +544,7 @@ public class ItemUtils {
} catch (NumberFormatException ignored) {
}
} else {
TLocale.Logger.error("ITEM-UTILS.FALL-LOAD-POTION", name);
TLocale.Logger.error("ITEM-UTILS.FAIL-LOAD-POTION", name);
}
return nbt;
}