1
0
mirror of https://e.coding.net/circlecloud/CTZServerBridge.git synced 2024-11-15 12:28:46 +00:00

update...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-11 23:06:24 +08:00
parent ed3d4c09d5
commit 214537ddee

View File

@ -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);
}
}