diff --git a/src/cn/citycraft/CTZLoginServer/CTZLoginQueue.java b/src/cn/citycraft/CTZLoginServer/CTZLoginQueue.java index 99eea1c..4cb6fa4 100644 --- a/src/cn/citycraft/CTZLoginServer/CTZLoginQueue.java +++ b/src/cn/citycraft/CTZLoginServer/CTZLoginQueue.java @@ -6,7 +6,9 @@ package cn.citycraft.CTZLoginServer; import java.util.HashMap; /** - * @author 蒋天蓓 2015年7月28日下午9:08:23 TODO + * 玩家登录队列类 + * + * @author 蒋天蓓 2015年7月28日下午9:08:23 */ public class CTZLoginQueue { protected static boolean checkIP = true;; @@ -26,8 +28,7 @@ public class CTZLoginQueue { } public static boolean canLogin(String player, String IP) { - return list.containsKey(player.toLowerCase()) - && list.get(player.toLowerCase()).equalsIgnoreCase(IP); + return list.containsKey(player.toLowerCase()) && list.get(player.toLowerCase()).equalsIgnoreCase(IP); } public static boolean isCheckIP() { @@ -39,8 +40,7 @@ public class CTZLoginQueue { } public static boolean Login(String player, String IP) { - if (list.containsKey(player.toLowerCase()) - && list.get(player.toLowerCase()).equalsIgnoreCase(IP)) { + if (list.containsKey(player.toLowerCase()) && list.get(player.toLowerCase()).equalsIgnoreCase(IP)) { list.remove(player.toLowerCase()); return true; } diff --git a/src/cn/citycraft/CTZLoginServer/CTZServers.java b/src/cn/citycraft/CTZLoginServer/CTZServers.java index a75da65..04b1d0f 100644 --- a/src/cn/citycraft/CTZLoginServer/CTZServers.java +++ b/src/cn/citycraft/CTZLoginServer/CTZServers.java @@ -45,7 +45,9 @@ class CTZServer { } /** - * @author 蒋天蓓 2015年8月8日下午2:50:02 TODO + * Json服务器信息序列化类 + * + * @author 蒋天蓓 2015年8月8日下午2:50:02 */ public class CTZServers { @@ -106,18 +108,22 @@ public class CTZServers { */ public boolean isChinese(char c) { Character.UnicodeBlock ub = Character.UnicodeBlock.of(c); - if (ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS - || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS - || ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A - || ub == Character.UnicodeBlock.GENERAL_PUNCTUATION - || ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION - || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS) + if (ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS + || ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || ub == Character.UnicodeBlock.GENERAL_PUNCTUATION + || ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS) return true; return false; } } +/** + * 服务器数据序列化类 + * + * @author 蒋天蓓 + * 2015年8月14日下午4:36:12 + * + */ class Server { public String name; diff --git a/src/cn/citycraft/CTZLoginServer/listen/PlayerListen.java b/src/cn/citycraft/CTZLoginServer/listen/PlayerListen.java index 5799935..c6af120 100644 --- a/src/cn/citycraft/CTZLoginServer/listen/PlayerListen.java +++ b/src/cn/citycraft/CTZLoginServer/listen/PlayerListen.java @@ -18,7 +18,9 @@ import cn.citycraft.CTZLoginServer.config.Config; import fr.xephi.authme.api.API; /** - * @author 蒋天蓓 2015年7月28日下午9:05:20 TODO + * 玩家登录监听类 + * + * @author 蒋天蓓 2015年7月28日下午9:05:20 */ public class PlayerListen implements Listener { protected HashMap lastquittime = new HashMap(); @@ -49,8 +51,7 @@ public class PlayerListen implements Listener { e.setResult(Result.KICK_WHITELIST); } - @EventHandler( - priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST) public void PlayerJoin(PlayerJoinEvent e) { String name = e.getPlayer().getName().toLowerCase(); if (lastquittime.containsKey(name)) {