Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 450-new-settings-rewrite
Conflicts: src/main/java/fr/xephi/authme/AuthMe.java src/main/java/fr/xephi/authme/settings/Settings.java src/main/java/fr/xephi/authme/settings/custom/NewSetting.java
This commit is contained in:
@@ -77,8 +77,7 @@ public abstract class CustomConfiguration extends YamlConfiguration {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ConsoleLogger.writeStackTrace(e);
|
||||
ConsoleLogger.showError("Failed to load config from JAR");
|
||||
ConsoleLogger.logException("Failed to load config from JAR", e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -181,8 +181,7 @@ public class NewSetting {
|
||||
writer.flush();
|
||||
writer.close();
|
||||
} catch (IOException e) {
|
||||
ConsoleLogger.showError("Could not save config file - " + StringUtils.formatException(e));
|
||||
ConsoleLogger.writeStackTrace(e);
|
||||
ConsoleLogger.logException("Could not save config file:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class Settings {
|
||||
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
||||
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
||||
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
||||
kickPlayersBeforeStopping,
|
||||
kickPlayersBeforeStopping, allowAllCommandsIfRegIsOptional,
|
||||
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
||||
public static String getNickRegex, getUnloggedinGroup, getMySQLHost,
|
||||
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
||||
@@ -189,6 +189,7 @@ public final class Settings {
|
||||
isStopEnabled = configFile.getBoolean("Security.SQLProblem.stopServer", true);
|
||||
reloadSupport = configFile.getBoolean("Security.ReloadCommand.useReloadCommandSupport", true);
|
||||
|
||||
allowAllCommandsIfRegIsOptional = configFile.getBoolean("settings.restrictions.allowAllCommandsIfRegistrationIsOptional", false);
|
||||
allowCommands = new ArrayList<>();
|
||||
allowCommands.addAll(Arrays.asList("/login", "/l", "/register", "/reg", "/email", "/captcha"));
|
||||
for (String cmd : configFile.getStringList("settings.restrictions.allowCommands")) {
|
||||
|
||||
@@ -18,13 +18,19 @@ public class RestrictionSettings implements SettingsClass {
|
||||
public static final Property<Boolean> ALLOW_CHAT =
|
||||
newProperty("settings.restrictions.allowChat", false);
|
||||
|
||||
@Comment({
|
||||
"Allow unlogged users to use all the commands if registration is not forced!",
|
||||
"WARNING: use this only if you need it!)"})
|
||||
public static final Property<Boolean> ALLOW_ALL_COMMANDS_IF_REGISTRATION_IS_OPTIONAL =
|
||||
newProperty("settings.restrictions.allowAllCommandsIfRegistrationIsOptional", false);
|
||||
|
||||
@Comment("Allowed commands for unauthenticated players")
|
||||
public static final Property<List<String>> ALLOW_COMMANDS =
|
||||
newProperty(PropertyType.STRING_LIST, "settings.restrictions.allowCommands",
|
||||
"login", "register", "l", "reg", "email", "captcha");
|
||||
|
||||
@Comment("Max number of allowed registrations per IP")
|
||||
// TODO ljacqu 20160109: If 0 == unlimited, add this fact ot the comment
|
||||
// TODO ljacqu 20160109: If 0 == unlimited, add this fact to the comment
|
||||
public static final Property<Integer> MAX_REGISTRATION_PER_IP =
|
||||
newProperty("settings.restrictions.maxRegPerIp", 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user