1
0
mirror of https://e.coding.net/circlecloud/AuthMe.git synced 2024-12-22 06:48:55 +00:00

fix login language error...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-10-29 10:34:33 +08:00
parent 347defcfda
commit 41c940c9d6
2 changed files with 13 additions and 24 deletions

View File

@ -92,7 +92,7 @@ public class DataManager {
} catch (final Exception e) { } catch (final Exception e) {
} }
} }
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " AntiXRayData Files"); ConsoleLogger.info("自动清理数据库: 移除 " + i + " 个 AntiXRayData 文件");
} }
public synchronized void purgeDat(final List<String> cleared) { public synchronized void purgeDat(final List<String> cleared) {
@ -105,8 +105,8 @@ public class DataManager {
continue; continue;
} }
try { try {
playerFile = new File( playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId()
plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat"); + ".dat");
} catch (final Exception ignore) { } catch (final Exception ignore) {
} }
if (playerFile != null && playerFile.exists()) { if (playerFile != null && playerFile.exists()) {
@ -122,7 +122,7 @@ public class DataManager {
} catch (final Exception ignore) { } catch (final Exception ignore) {
} }
} }
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " .dat Files"); ConsoleLogger.info("自动清理数据库: 移除 " + i + " 个 .dat 文件");
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@ -148,7 +148,7 @@ public class DataManager {
} catch (final Exception e) { } catch (final Exception e) {
} }
} }
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " EssentialsFiles"); ConsoleLogger.info("自动清理数据库: 移除 " + i + " EssentialsFiles 文件");
} }
public synchronized void purgeLimitedCreative(final List<String> cleared) { public synchronized void purgeLimitedCreative(final List<String> cleared) {
@ -178,7 +178,7 @@ public class DataManager {
} catch (final Exception e) { } catch (final Exception e) {
} }
} }
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " LimitedCreative Survival, Creative and Adventure files"); ConsoleLogger.info("自动清理数据库: 移除 " + i + " LimitedCreative Survival, Creative and Adventure 文件");
} }
public synchronized void purgePermissions(final List<String> cleared, final Permission permission) { public synchronized void purgePermissions(final List<String> cleared, final Permission permission) {
@ -193,7 +193,7 @@ public class DataManager {
} catch (final Exception e) { } catch (final Exception e) {
} }
} }
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " Permissions"); ConsoleLogger.info("自动清理数据库: 移除 " + i + " Permissions 文件");
} }
public void run() { public void run() {

View File

@ -32,30 +32,19 @@ public class Messages {
} }
public void send(final CommandSender sender, final String msg) { public void send(final CommandSender sender, final String msg) {
String loc = msgcfg.getMessage(msg); final String[] loc = send(msg);
if (loc == null || loc.isEmpty()) { for (final String l : loc) {
loc = "错误的语言文件 " + msg + " ; 请联系管理员升级语言文件";
ConsoleLogger.showError("错误的语言文件 " + msg + " 请检查您的配置文件" + msgcfg.getName() + " !");
}
for (final String l : loc.split("&n")) {
sender.sendMessage(l); sender.sendMessage(l);
} }
} }
public String[] send(final String msg) { public String[] send(final String msg) {
final String s = msgcfg.getMessage(msg); String loc = msgcfg.getMessage(msg);
if (s == null || s.isEmpty()) { if (loc == null || loc.isEmpty()) {
loc = "错误的语言文件 " + msg + " ; 请联系管理员升级语言文件";
ConsoleLogger.showError("错误的语言文件 " + msg + " 请检查您的配置文件" + msgcfg.getName() + " !"); ConsoleLogger.showError("错误的语言文件 " + msg + " 请检查您的配置文件" + msgcfg.getName() + " !");
final String[] loc = new String[1];
loc[0] = "错误的语言文件 " + msg + " ; 请联系管理员升级语言文件";
return (loc);
} }
final int i = s.split("&n").length; return loc.split("&n");
final String[] loc = new String[i];
if (loc.length == 0) {
loc[0] = "错误的语言文件 " + msg + " ; 请联系管理员升级语言文件";
}
return loc;
} }
} }