From f88e197863779cf0c4150956a7d6f87b0f9885af Mon Sep 17 00:00:00 2001 From: DNx5 Date: Fri, 25 Sep 2015 05:21:32 +0700 Subject: [PATCH] cleanup Settings --- .../java/fr/xephi/authme/settings/Settings.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index f79d4e24..24a72173 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -18,7 +18,7 @@ public final class Settings extends YamlConfiguration { private static Settings instance; // This is not an option! - public static Boolean antiBotInAction = false; + public static boolean antiBotInAction = false; public static final File PLUGIN_FOLDER = AuthMe.getInstance().getDataFolder(); public static final File MODULE_FOLDER = new File(PLUGIN_FOLDER, "modules"); @@ -513,11 +513,11 @@ public final class Settings extends YamlConfiguration { * return false if ip and name doesnt amtch with player that join the * server, so player has a restricted access */ - public static Boolean getRestrictedIp(String name, String ip) { + public static boolean getRestrictedIp(String name, String ip) { Iterator iter = getRestrictedIp.iterator(); - Boolean trueonce = false; - Boolean namefound = false; + boolean trueonce = false; + boolean namefound = false; while (iter.hasNext()) { String[] args = iter.next().split(";"); String testname = args[0]; @@ -529,11 +529,7 @@ public final class Settings extends YamlConfiguration { } } } - if (!namefound) { - return true; - } else { - return trueonce; - } + return !namefound || trueonce; } /**