From 08292b8ac1809be51ba65d0606739a94c1cab17e Mon Sep 17 00:00:00 2001 From: Xephi59 Date: Sun, 12 Jul 2015 23:14:21 +0200 Subject: [PATCH] Change to StringList --- .../fr/xephi/authme/settings/Settings.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index 085594c59..ae53fdace 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -218,7 +218,7 @@ public final class Settings extends YamlConfiguration { multiverse = configFile.getBoolean("Hooks.multiverse", true); chestshop = configFile.getBoolean("Hooks.chestshop", true); bungee = configFile.getBoolean("Hooks.bungeecord", false); - getForcedWorlds = (List) configFile.getList("settings.restrictions.ForceSpawnOnTheseWorlds", new ArrayList()); + getForcedWorlds = configFile.getStringList("settings.restrictions.ForceSpawnOnTheseWorlds"); banUnsafeIp = configFile.getBoolean("settings.restrictions.banUnsafedIP", false); doubleEmailCheck = configFile.getBoolean("settings.registration.doubleEmailCheck", false); sessionExpireOnIpChange = configFile.getBoolean("settings.sessions.sessionExpireOnIpChange", false); @@ -240,17 +240,17 @@ public final class Settings extends YamlConfiguration { purgeAntiXray = configFile.getBoolean("Purge.removeAntiXRayFile", false); purgePermissions = configFile.getBoolean("Purge.removePermissions", false); enableProtection = configFile.getBoolean("Protection.enableProtection", false); - countries = (List) configFile.getList("Protection.countries", new ArrayList()); + countries = configFile.getStringList("Protection.countries"); enableAntiBot = configFile.getBoolean("Protection.enableAntiBot", false); antiBotSensibility = configFile.getInt("Protection.antiBotSensibility", 5); antiBotDuration = configFile.getInt("Protection.antiBotDuration", 10); - forceCommands = (List) configFile.getList("settings.forceCommands", new ArrayList()); - forceCommandsAsConsole = (List) configFile.getList("settings.forceCommandsAsConsole", new ArrayList()); + forceCommands = configFile.getStringList("settings.forceCommands"); + forceCommandsAsConsole = configFile.getStringList("settings.forceCommandsAsConsole"); recallEmail = configFile.getBoolean("Email.recallPlayers", false); delayRecall = configFile.getInt("Email.delayRecall", 5); useWelcomeMessage = configFile.getBoolean("settings.useWelcomeMessage", true); - unsafePasswords = (List) configFile.getList("settings.security.unsafePasswords", new ArrayList()); - countriesBlacklist = (List) configFile.getList("Protection.countriesBlacklist", new ArrayList()); + unsafePasswords = configFile.getStringList("settings.security.unsafePasswords"); + countriesBlacklist = configFile.getStringList("Protection.countriesBlacklist"); broadcastWelcomeMessage = configFile.getBoolean("settings.broadcastWelcomeMessage", false); forceRegKick = configFile.getBoolean("settings.registration.forceKickAfterRegister", false); forceRegLogin = configFile.getBoolean("settings.registration.forceLoginAfterRegister", false); @@ -266,7 +266,7 @@ public final class Settings extends YamlConfiguration { applyBlindEffect = configFile.getBoolean("settings.applyBlindEffect", false); emailBlacklist = configFile.getStringList("Email.emailBlacklisted"); emailWhitelist = configFile.getStringList("Email.emailWhitelisted"); - forceRegisterCommands = (List) configFile.getList("settings.forceRegisterCommands", new ArrayList()); + forceRegisterCommands = configFile.getStringList("settings.forceRegisterCommands"); forceRegisterCommandsAsConsole = (List) configFile.getList("settings.forceRegisterCommandsAsConsole", new ArrayList()); customAttributes = configFile.getBoolean("Hooks.customAttributes"); generateImage = configFile.getBoolean("Email.generateImage", true); @@ -323,12 +323,12 @@ public final class Settings extends YamlConfiguration { getMySQLColumnPassword = configFile.getString("DataSource.mySQLColumnPassword", "password"); getMySQLColumnIp = configFile.getString("DataSource.mySQLColumnIp", "ip"); getMySQLColumnLastLogin = configFile.getString("DataSource.mySQLColumnLastLogin", "lastlogin"); + getMySQLColumnSalt = configFile.getString("ExternalBoardOptions.mySQLColumnSalt"); + getMySQLColumnGroup = configFile.getString("ExternalBoardOptions.mySQLColumnGroup", ""); getMySQLlastlocX = configFile.getString("DataSource.mySQLlastlocX", "x"); getMySQLlastlocY = configFile.getString("DataSource.mySQLlastlocY", "y"); getMySQLlastlocZ = configFile.getString("DataSource.mySQLlastlocZ", "z"); getMySQLlastlocWorld = configFile.getString("DataSource.mySQLlastlocWorld", "world"); - getMySQLColumnSalt = configFile.getString("ExternalBoardOptions.mySQLColumnSalt", ""); - getMySQLColumnGroup = configFile.getString("ExternalBoardOptions.mySQLColumnGroup", ""); getNonActivatedGroup = configFile.getInt("ExternalBoardOptions.nonActivedUserGroup", -1); unRegisteredGroup = configFile.getString("GroupOptions.UnregisteredPlayerGroup", ""); getUnrestrictedName = configFile.getStringList("settings.unrestrictions.UnrestrictedName"); @@ -385,7 +385,7 @@ public final class Settings extends YamlConfiguration { multiverse = configFile.getBoolean("Hooks.multiverse", true); chestshop = configFile.getBoolean("Hooks.chestshop", true); bungee = configFile.getBoolean("Hooks.bungeecord", false); - getForcedWorlds = (List) configFile.getList("settings.restrictions.ForceSpawnOnTheseWorlds"); + getForcedWorlds = configFile.getStringList("settings.restrictions.ForceSpawnOnTheseWorlds"); banUnsafeIp = configFile.getBoolean("settings.restrictions.banUnsafedIP", false); doubleEmailCheck = configFile.getBoolean("settings.registration.doubleEmailCheck", false); sessionExpireOnIpChange = configFile.getBoolean("settings.sessions.sessionExpireOnIpChange", false); @@ -407,17 +407,17 @@ public final class Settings extends YamlConfiguration { purgeAntiXray = configFile.getBoolean("Purge.removeAntiXRayFile", false); purgePermissions = configFile.getBoolean("Purge.removePermissions", false); enableProtection = configFile.getBoolean("Protection.enableProtection", false); - countries = (List) configFile.getList("Protection.countries"); + countries = configFile.getStringList("Protection.countries"); enableAntiBot = configFile.getBoolean("Protection.enableAntiBot", false); antiBotSensibility = configFile.getInt("Protection.antiBotSensibility", 5); antiBotDuration = configFile.getInt("Protection.antiBotDuration", 10); - forceCommands = (List) configFile.getList("settings.forceCommands", new ArrayList()); - forceCommandsAsConsole = (List) configFile.getList("settings.forceCommandsAsConsole", new ArrayList()); + forceCommands = configFile.getStringList("settings.forceCommands"); + forceCommandsAsConsole = configFile.getStringList("settings.forceCommandsAsConsole"); recallEmail = configFile.getBoolean("Email.recallPlayers", false); delayRecall = configFile.getInt("Email.delayRecall", 5); useWelcomeMessage = configFile.getBoolean("settings.useWelcomeMessage", true); - unsafePasswords = (List) configFile.getList("settings.security.unsafePasswords", new ArrayList()); - countriesBlacklist = (List) configFile.getList("Protection.countriesBlacklist", new ArrayList()); + unsafePasswords = configFile.getStringList("settings.security.unsafePasswords"); + countriesBlacklist = configFile.getStringList("Protection.countriesBlacklist"); broadcastWelcomeMessage = configFile.getBoolean("settings.broadcastWelcomeMessage", false); forceRegKick = configFile.getBoolean("settings.registration.forceKickAfterRegister", false); forceRegLogin = configFile.getBoolean("settings.registration.forceLoginAfterRegister", false); @@ -433,7 +433,7 @@ public final class Settings extends YamlConfiguration { applyBlindEffect = configFile.getBoolean("settings.applyBlindEffect", false); emailBlacklist = configFile.getStringList("Email.emailBlacklisted"); emailWhitelist = configFile.getStringList("Email.emailWhitelisted"); - forceRegisterCommands = (List) configFile.getList("settings.forceRegisterCommands", new ArrayList()); + forceRegisterCommands = configFile.getStringList("settings.forceRegisterCommands"); forceRegisterCommandsAsConsole = (List) configFile.getList("settings.forceRegisterCommandsAsConsole", new ArrayList()); customAttributes = configFile.getBoolean("Hooks.customAttributes"); generateImage = configFile.getBoolean("Email.generateImage", true);