#347 Use NewSetting properties for change password command

This commit is contained in:
ljacqu
2016-01-17 12:33:29 +01:00
parent fb6cff2e07
commit e18be3024a
8 changed files with 37 additions and 24 deletions
@@ -7,6 +7,7 @@ import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.datasource.DataSource.DataSourceType;
import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.util.StringUtils;
import fr.xephi.authme.util.Wrapper;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -311,7 +312,7 @@ public final class Settings {
try {
return Files.toString(EMAIL_FILE, Charsets.UTF_8);
} catch (IOException e) {
ConsoleLogger.showError(e.getMessage());
ConsoleLogger.showError("Error loading email text: " + StringUtils.formatException(e));
ConsoleLogger.writeStackTrace(e);
return "";
}
@@ -158,7 +158,7 @@ public class RestrictionSettings implements SettingsClass {
newProperty("settings.restrictions.noTeleport", false);
@Comment("Regex syntax for allowed chars in passwords")
public static final Property<String> ALLOWED_PASSWORD_CHARS =
public static final Property<String> ALLOWED_PASSWORD_REGEX =
newProperty("settings.restrictions.allowedPasswordCharacters", "[\\x21-\\x7E]*");
@Comment("Force survival gamemode when player joins?")
@@ -51,6 +51,10 @@ public class SecuritySettings implements SettingsClass {
public static final Property<Integer> MIN_PASSWORD_LENGTH =
newProperty("settings.security.minPasswordLength", 5);
@Comment("Maximum length of password")
public static final Property<Integer> MAX_PASSWORD_LENGTH =
newProperty("settings.security.passwordMaxLength", 30);
@Comment({
"This is a very important option: every time a player joins the server,",
"if they are registered, AuthMe will switch him to unLoggedInGroup.",