tempupdate...

Signed-off-by: 502647092 <jtb1@163.com>
master
502647092 2015-10-10 17:52:09 +08:00
parent 24a2f5e54c
commit 8f050484d4
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ package cn.citycraft.CTZServerCommon;
import cn.citycraft.PluginHelper.sql.KeyValue; import cn.citycraft.PluginHelper.sql.KeyValue;
import cn.citycraft.PluginHelper.sql.MySQLHelper; import cn.citycraft.PluginHelper.sql.MySQLHelper;
import cn.citycraft.PluginHelper.sql.SQLHelper; import cn.citycraft.PluginHelper.sql.DataBaseCore;
import cn.citycraft.PluginHelper.utils.StringUtil; import cn.citycraft.PluginHelper.utils.StringUtil;
import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.ChatColor;
@ -15,7 +15,7 @@ public class CTZAuth {
static final String ALLOWLoginField = "allowlogin"; static final String ALLOWLoginField = "allowlogin";
static final String LASTLOGOUT = "lastlogout"; static final String LASTLOGOUT = "lastlogout";
static final String IP = "ip"; static final String IP = "ip";
static SQLHelper sql; static DataBaseCore sql;
public static boolean allowLogin(String username) { public static boolean allowLogin(String username) {
return allowLogin(username, null); return allowLogin(username, null);
@ -46,7 +46,7 @@ public class CTZAuth {
return sql.isFieldExists(TableName, new KeyValue(UserField, username).add(PWDField, StringUtil.getMD5Code(password))); return sql.isFieldExists(TableName, new KeyValue(UserField, username).add(PWDField, StringUtil.getMD5Code(password)));
} }
public static void init(SQLHelper sql, String address, int port, String datebase, String username, String password) { public static void init(DataBaseCore sql, String address, int port, String datebase, String username, String password) {
CTZAuth.sql = sql; CTZAuth.sql = sql;
CTZServer.print(ChatColor.GREEN + "初始化数据库连接..."); CTZServer.print(ChatColor.GREEN + "初始化数据库连接...");
sql = new MySQLHelper(address, port, datebase, username, password); sql = new MySQLHelper(address, port, datebase, username, password);