diff --git a/src/main/java/cn/citycraft/CTZServerBridge/CTZServerBridge.java b/src/main/java/cn/citycraft/CTZServerBridge/CTZServerBridge.java index 85bda3c..a0a18dd 100644 --- a/src/main/java/cn/citycraft/CTZServerBridge/CTZServerBridge.java +++ b/src/main/java/cn/citycraft/CTZServerBridge/CTZServerBridge.java @@ -8,15 +8,15 @@ import org.bukkit.plugin.java.JavaPlugin; import cn.citycraft.CTZServerBridge.listen.PlayerListen; import cn.citycraft.CTZServerCommon.CTZAuth; import cn.citycraft.PluginHelper.config.FileConfig; -import cn.citycraft.PluginHelper.sql.DataBaseCore; +import cn.citycraft.PluginHelper.sql.DataBase; public class CTZServerBridge extends JavaPlugin { ConsoleCommandSender ccs; - DataBaseCore sql; + DataBase sql; public FileConfig config; - public DataBaseCore getSql() { + public DataBase getSql() { return sql; } @@ -37,7 +37,7 @@ public class CTZServerBridge extends JavaPlugin { } private void initListener() { - PluginManager pm = Bukkit.getPluginManager(); + final PluginManager pm = Bukkit.getPluginManager(); pm.registerEvents(new PlayerListen(this), this); } @@ -46,11 +46,11 @@ public class CTZServerBridge extends JavaPlugin { */ void initDatabase() { // 连接数据库用到的一些参数. - String dbHost = config.getMessage("config.mysql.ip"); - int dbPort = config.getInt("config.mysql.port"); - String dbName = config.getMessage("config.mysql.database"); - String dbuserName = config.getMessage("config.mysql.username"); - String dbpwd = config.getMessage("config.mysql.password"); + final String dbHost = config.getMessage("config.mysql.ip"); + final int dbPort = config.getInt("config.mysql.port"); + final String dbName = config.getMessage("config.mysql.database"); + final String dbuserName = config.getMessage("config.mysql.username"); + final String dbpwd = config.getMessage("config.mysql.password"); CTZAuth.init(sql, dbHost, dbPort, dbName, dbuserName, dbpwd); } }