版本更新至 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

@@ -32,7 +32,7 @@ public class MySQLConnection {
public MySQLConnection(String url, String user, String port, String password, String database, int recheck, Plugin plugin) {
// 检查驱动
if (!loadDriverMySQL()) {
TLocale.Logger.error("MYSQL-CONNECTION.FALL-NOTFOUND-DRIVE");
TLocale.Logger.error("MYSQL-CONNECTION.FAIL-NOTFOUND-DRIVE");
return;
}
@@ -58,12 +58,12 @@ public class MySQLConnection {
Thread.sleep(getReCheckSeconds() * 1000);
if (connection == null) {
TLocale.Logger.error("MYSQL-CONNECTION.FALL-NOTFOUND-CONNECTION", plugin.getName());
TLocale.Logger.error("MYSQL-CONNECTION.FAIL-NOTFOUND-CONNECTION", plugin.getName());
} else {
isExists("taboolib");
}
} catch (Exception e) {
TLocale.Logger.error("MYSQL-CONNECTION.FALL-COMMAND-NORMAL", e.toString());
TLocale.Logger.error("MYSQL-CONNECTION.FAIL-COMMAND-NORMAL", e.toString());
}
}
});
@@ -657,12 +657,12 @@ public class MySQLConnection {
}
private void printException(Exception e) {
TLocale.Logger.error("MYSQL-CONNECTION.FALL-COMMAND-NORMAL", e.toString());
TLocale.Logger.error("MYSQL-CONNECTION.FAIL-COMMAND-NORMAL", e.toString());
reconnection(e);
}
private void printExceptionDetail(SQLException e) {
TLocale.Logger.error("MYSQL-CONNECTION.FALL-COMMAND-DETAIL", String.valueOf(e.getErrorCode()), e.toString());
TLocale.Logger.error("MYSQL-CONNECTION.FAIL-COMMAND-DETAIL", String.valueOf(e.getErrorCode()), e.toString());
reconnection(e);
}