update Settings
This commit is contained in:
parent
683ec09ecf
commit
a013a6c54f
@ -189,7 +189,8 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isUnrestricted(Player player) {
|
public static boolean isUnrestricted(Player player) {
|
||||||
return Settings.isAllowRestrictedIp && !(Settings.getUnrestrictedName == null || Settings.getUnrestrictedName.isEmpty()) && (Settings.getUnrestrictedName.contains(player.getName()));
|
return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty()
|
||||||
|
&& (Settings.getUnrestrictedName.contains(player.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean useGroupSystem() {
|
private static boolean useGroupSystem() {
|
||||||
|
|||||||
@ -119,7 +119,6 @@ public final class Settings extends YamlConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public static void loadVariables() {
|
public static void loadVariables() {
|
||||||
messagesLanguage = checkLang(configFile.getString("settings.messagesLanguage", "en").toLowerCase());
|
messagesLanguage = checkLang(configFile.getString("settings.messagesLanguage", "en").toLowerCase());
|
||||||
isPermissionCheckEnabled = configFile.getBoolean("permission.EnablePermissionCheck", false);
|
isPermissionCheckEnabled = configFile.getBoolean("permission.EnablePermissionCheck", false);
|
||||||
@ -185,7 +184,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
backupWindowsPath = configFile.getString("BackupSystem.MysqlWindowsPath", "C:\\Program Files\\MySQL\\MySQL Server 5.1\\");
|
backupWindowsPath = configFile.getString("BackupSystem.MysqlWindowsPath", "C:\\Program Files\\MySQL\\MySQL Server 5.1\\");
|
||||||
isStopEnabled = configFile.getBoolean("Security.SQLProblem.stopServer", true);
|
isStopEnabled = configFile.getBoolean("Security.SQLProblem.stopServer", true);
|
||||||
reloadSupport = configFile.getBoolean("Security.ReloadCommand.useReloadCommandSupport", true);
|
reloadSupport = configFile.getBoolean("Security.ReloadCommand.useReloadCommandSupport", true);
|
||||||
allowCommands = (List<String>) configFile.getList("settings.restrictions.allowCommands");
|
allowCommands = configFile.getStringList("settings.restrictions.allowCommands");
|
||||||
if (configFile.contains("allowCommands")) {
|
if (configFile.contains("allowCommands")) {
|
||||||
if (!allowCommands.contains("/login"))
|
if (!allowCommands.contains("/login"))
|
||||||
allowCommands.add("/login");
|
allowCommands.add("/login");
|
||||||
@ -210,7 +209,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
getmailSMTP = configFile.getString("Email.mailSMTP", "smtp.gmail.com");
|
getmailSMTP = configFile.getString("Email.mailSMTP", "smtp.gmail.com");
|
||||||
getMailPort = configFile.getInt("Email.mailPort", 465);
|
getMailPort = configFile.getInt("Email.mailPort", 465);
|
||||||
getRecoveryPassLength = configFile.getInt("Email.RecoveryPasswordLength", 8);
|
getRecoveryPassLength = configFile.getInt("Email.RecoveryPasswordLength", 8);
|
||||||
getMySQLOtherUsernameColumn = (List<String>) configFile.getList("ExternalBoardOptions.mySQLOtherUsernameColumns", new ArrayList<String>());
|
getMySQLOtherUsernameColumn = configFile.getStringList("ExternalBoardOptions.mySQLOtherUsernameColumns");
|
||||||
displayOtherAccounts = configFile.getBoolean("settings.restrictions.displayOtherAccounts", true);
|
displayOtherAccounts = configFile.getBoolean("settings.restrictions.displayOtherAccounts", true);
|
||||||
getMySQLColumnId = configFile.getString("DataSource.mySQLColumnId", "id");
|
getMySQLColumnId = configFile.getString("DataSource.mySQLColumnId", "id");
|
||||||
getmailSenderName = configFile.getString("Email.mailSenderName", "");
|
getmailSenderName = configFile.getString("Email.mailSenderName", "");
|
||||||
@ -274,7 +273,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
emailBlacklist = configFile.getStringList("Email.emailBlacklisted");
|
emailBlacklist = configFile.getStringList("Email.emailBlacklisted");
|
||||||
emailWhitelist = configFile.getStringList("Email.emailWhitelisted");
|
emailWhitelist = configFile.getStringList("Email.emailWhitelisted");
|
||||||
forceRegisterCommands = configFile.getStringList("settings.forceRegisterCommands");
|
forceRegisterCommands = configFile.getStringList("settings.forceRegisterCommands");
|
||||||
forceRegisterCommandsAsConsole = (List<String>) configFile.getList("settings.forceRegisterCommandsAsConsole", new ArrayList<String>());
|
forceRegisterCommandsAsConsole = configFile.getStringList("settings.forceRegisterCommandsAsConsole");
|
||||||
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
||||||
generateImage = configFile.getBoolean("Email.generateImage", true);
|
generateImage = configFile.getBoolean("Email.generateImage", true);
|
||||||
|
|
||||||
@ -289,7 +288,8 @@ public final class Settings extends YamlConfiguration {
|
|||||||
set("Xenoforo.predefinedSalt", null);
|
set("Xenoforo.predefinedSalt", null);
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
if (configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA1") || configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA256")) {
|
if (configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA1") ||
|
||||||
|
configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA256")) {
|
||||||
set("settings.security.passwordHash", "XENFORO");
|
set("settings.security.passwordHash", "XENFORO");
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ public final class Settings extends YamlConfiguration {
|
|||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
if (contains("Hooks.chestshop")) {
|
if (contains("Hooks.chestshop")) {
|
||||||
if(getBoolean("Hooks.chestshop")) {
|
if (getBoolean("Hooks.chestshop")) {
|
||||||
set("Hooks.legacyChestshop", true);
|
set("Hooks.legacyChestshop", true);
|
||||||
}
|
}
|
||||||
set("Hooks.chestshop", null);
|
set("Hooks.chestshop", null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user