mirror of
https://e.coding.net/circlecloud/CTZServerCommon.git
synced 2024-12-27 18:38:47 +00:00
tempupdate...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
24a2f5e54c
commit
8f050484d4
@ -2,7 +2,7 @@ package cn.citycraft.CTZServerCommon;
|
||||
|
||||
import cn.citycraft.PluginHelper.sql.KeyValue;
|
||||
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 net.md_5.bungee.api.ChatColor;
|
||||
|
||||
@ -15,7 +15,7 @@ public class CTZAuth {
|
||||
static final String ALLOWLoginField = "allowlogin";
|
||||
static final String LASTLOGOUT = "lastlogout";
|
||||
static final String IP = "ip";
|
||||
static SQLHelper sql;
|
||||
static DataBaseCore sql;
|
||||
|
||||
public static boolean allowLogin(String username) {
|
||||
return allowLogin(username, null);
|
||||
@ -46,7 +46,7 @@ public class CTZAuth {
|
||||
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;
|
||||
CTZServer.print(ChatColor.GREEN + "初始化数据库连接...");
|
||||
sql = new MySQLHelper(address, port, datebase, username, password);
|
||||
|
Loading…
Reference in New Issue
Block a user