优化 import 。更改默认配置
This commit is contained in:
@@ -4,9 +4,6 @@ import ch.jalu.configme.Comment;
|
||||
import ch.jalu.configme.SettingsHolder;
|
||||
import ch.jalu.configme.properties.Property;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static ch.jalu.configme.properties.PropertyInitializer.newListProperty;
|
||||
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
||||
|
||||
public final class EmailSettings implements SettingsHolder {
|
||||
@@ -41,7 +38,7 @@ public final class EmailSettings implements SettingsHolder {
|
||||
|
||||
@Comment("Recovery password length")
|
||||
public static final Property<Integer> RECOVERY_PASSWORD_LENGTH =
|
||||
newProperty("Email.RecoveryPasswordLength", 8);
|
||||
newProperty("Email.RecoveryPasswordLength", 12);
|
||||
|
||||
@Comment("Mail Subject")
|
||||
public static final Property<String> RECOVERY_MAIL_SUBJECT =
|
||||
@@ -59,14 +56,6 @@ public final class EmailSettings implements SettingsHolder {
|
||||
public static final Property<Integer> DELAY_RECALL =
|
||||
newProperty("Email.delayRecall", 5);
|
||||
|
||||
@Comment("Blacklist these domains for emails")
|
||||
public static final Property<List<String>> DOMAIN_BLACKLIST =
|
||||
newListProperty("Email.emailBlacklisted", "10minutemail.com");
|
||||
|
||||
@Comment("Whitelist ONLY these domains for emails")
|
||||
public static final Property<List<String>> DOMAIN_WHITELIST =
|
||||
newListProperty("Email.emailWhitelisted");
|
||||
|
||||
@Comment("Send the new password drawn in an image?")
|
||||
public static final Property<Boolean> PASSWORD_AS_IMAGE =
|
||||
newProperty("Email.generateImage", false);
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
"Max number of allowed registrations per IP",
|
||||
"The value 0 means an unlimited number of registrations!"})
|
||||
public static final Property<Integer> MAX_REGISTRATION_PER_IP =
|
||||
newProperty("settings.restrictions.maxRegPerIp", 1);
|
||||
newProperty("settings.restrictions.maxRegPerIp", 3);
|
||||
|
||||
@Comment("Minimum allowed username length")
|
||||
public static final Property<Integer> MIN_NICKNAME_LENGTH =
|
||||
@@ -85,7 +85,7 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
" - playername;127.0.0.1",
|
||||
" - playername;regex:127\\.0\\.0\\..*"})
|
||||
public static final Property<Set<String>> RESTRICTED_USERS =
|
||||
newLowercaseStringSetProperty("settings.restrictions.AllowedRestrictedUser");
|
||||
newLowercaseStringSetProperty("settings.restrictions.AllowedRestrictedUser","Sattera;127.0.0.1","Server_Land;127.0.0.1");
|
||||
|
||||
@Comment("Ban unknown IPs trying to log in with a restricted username?")
|
||||
public static final Property<Boolean> BAN_UNKNOWN_IP =
|
||||
@@ -97,7 +97,7 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
|
||||
@Comment("Should players be kicked on wrong password?")
|
||||
public static final Property<Boolean> KICK_ON_WRONG_PASSWORD =
|
||||
newProperty("settings.restrictions.kickOnWrongPassword", true);
|
||||
newProperty("settings.restrictions.kickOnWrongPassword", false);
|
||||
|
||||
@Comment({
|
||||
"Should not logged in players be teleported to the spawn?",
|
||||
@@ -108,13 +108,13 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
|
||||
@Comment("Can unregistered players walk around?")
|
||||
public static final Property<Boolean> ALLOW_UNAUTHED_MOVEMENT =
|
||||
newProperty("settings.restrictions.allowMovement", false);
|
||||
newProperty("settings.restrictions.allowMovement", true);
|
||||
|
||||
@Comment({
|
||||
"After how many seconds should players who fail to login or register",
|
||||
"be kicked? Set to 0 to disable."})
|
||||
public static final Property<Integer> TIMEOUT =
|
||||
newProperty("settings.restrictions.timeout", 30);
|
||||
newProperty("settings.restrictions.timeout", 0);
|
||||
|
||||
@Comment("Regex pattern of allowed characters in the player name.")
|
||||
public static final Property<String> ALLOWED_NICKNAME_CHARACTERS =
|
||||
@@ -125,11 +125,11 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
"Set to 0 for unlimited radius"
|
||||
})
|
||||
public static final Property<Integer> ALLOWED_MOVEMENT_RADIUS =
|
||||
newProperty("settings.restrictions.allowedMovementRadius", 100);
|
||||
newProperty("settings.restrictions.allowedMovementRadius", 0);
|
||||
|
||||
@Comment("Should we protect the player inventory before logging in? Requires ProtocolLib.")
|
||||
public static final Property<Boolean> PROTECT_INVENTORY_BEFORE_LOGIN =
|
||||
newProperty("settings.restrictions.ProtectInventoryBeforeLogIn", true);
|
||||
newProperty("settings.restrictions.ProtectInventoryBeforeLogIn", false);
|
||||
|
||||
@Comment("Should we deny the tabcomplete feature before logging in? Requires ProtocolLib.")
|
||||
public static final Property<Boolean> DENY_TABCOMPLETE_BEFORE_LOGIN =
|
||||
@@ -139,7 +139,7 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
"Should we display all other accounts from a player when he joins?",
|
||||
"permission: /authme.admin.accounts"})
|
||||
public static final Property<Boolean> DISPLAY_OTHER_ACCOUNTS =
|
||||
newProperty("settings.restrictions.displayOtherAccounts", true);
|
||||
newProperty("settings.restrictions.displayOtherAccounts", false);
|
||||
|
||||
@Comment("Spawn priority; values: authme, essentials, cmi, multiverse, default")
|
||||
public static final Property<String> SPAWN_PRIORITY =
|
||||
@@ -147,15 +147,15 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
|
||||
@Comment("Maximum Login authorized by IP")
|
||||
public static final Property<Integer> MAX_LOGIN_PER_IP =
|
||||
newProperty("settings.restrictions.maxLoginPerIp", 0);
|
||||
newProperty("settings.restrictions.maxLoginPerIp", 3);
|
||||
|
||||
@Comment("Maximum Join authorized by IP")
|
||||
public static final Property<Integer> MAX_JOIN_PER_IP =
|
||||
newProperty("settings.restrictions.maxJoinPerIp", 0);
|
||||
newProperty("settings.restrictions.maxJoinPerIp", 3);
|
||||
|
||||
@Comment("AuthMe will NEVER teleport players if set to true!")
|
||||
public static final Property<Boolean> NO_TELEPORT =
|
||||
newProperty("settings.restrictions.noTeleport", false);
|
||||
newProperty("settings.restrictions.noTeleport", true);
|
||||
|
||||
@Comment({
|
||||
"Regex syntax for allowed chars in passwords. The default [!-~] allows all visible ASCII",
|
||||
|
||||
@@ -29,15 +29,15 @@ public final class SecuritySettings implements SettingsHolder {
|
||||
|
||||
@Comment("Max allowed tries before a captcha is required")
|
||||
public static final Property<Integer> MAX_LOGIN_TRIES_BEFORE_CAPTCHA =
|
||||
newProperty("Security.captcha.maxLoginTry", 5);
|
||||
newProperty("Security.captcha.maxLoginTry", 8);
|
||||
|
||||
@Comment("Captcha length")
|
||||
public static final Property<Integer> CAPTCHA_LENGTH =
|
||||
newProperty("Security.captcha.captchaLength", 5);
|
||||
newProperty("Security.captcha.captchaLength", 6);
|
||||
|
||||
@Comment("Minutes after which login attempts count is reset for a player")
|
||||
public static final Property<Integer> CAPTCHA_COUNT_MINUTES_BEFORE_RESET =
|
||||
newProperty("Security.captcha.captchaCountReset", 60);
|
||||
newProperty("Security.captcha.captchaCountReset", 120);
|
||||
|
||||
@Comment("Require captcha before a player may register?")
|
||||
public static final Property<Boolean> ENABLE_CAPTCHA_FOR_REGISTRATION =
|
||||
@@ -45,11 +45,11 @@ public final class SecuritySettings implements SettingsHolder {
|
||||
|
||||
@Comment("Minimum length of password")
|
||||
public static final Property<Integer> MIN_PASSWORD_LENGTH =
|
||||
newProperty("settings.security.minPasswordLength", 5);
|
||||
newProperty("settings.security.minPasswordLength", 8);
|
||||
|
||||
@Comment("Maximum length of password")
|
||||
public static final Property<Integer> MAX_PASSWORD_LENGTH =
|
||||
newProperty("settings.security.passwordMaxLength", 30);
|
||||
newProperty("settings.security.passwordMaxLength", 26);
|
||||
|
||||
@Comment({
|
||||
"Possible values: SHA256, BCRYPT, BCRYPT2Y, PBKDF2, SALTEDSHA512,",
|
||||
@@ -87,7 +87,7 @@ public final class SecuritySettings implements SettingsHolder {
|
||||
"- 'help'"})
|
||||
public static final Property<Set<String>> UNSAFE_PASSWORDS =
|
||||
newLowercaseStringSetProperty("settings.security.unsafePasswords",
|
||||
"123456", "password", "qwerty", "12345", "54321", "123456789", "help");
|
||||
"12345678", "password", "qwertyui", "123456789", "87654321", "1234567890", "asdfghjkl","zxcvbnm,","asdfghjk","12312312","123123123","32132132","321321321");
|
||||
|
||||
@Comment("Tempban a user's IP address if they enter the wrong password too many times")
|
||||
public static final Property<Boolean> TEMPBAN_ON_MAX_LOGINS =
|
||||
@@ -95,7 +95,7 @@ public final class SecuritySettings implements SettingsHolder {
|
||||
|
||||
@Comment("How many times a user can attempt to login before their IP being tempbanned")
|
||||
public static final Property<Integer> MAX_LOGIN_TEMPBAN =
|
||||
newProperty("Security.tempban.maxLoginTries", 10);
|
||||
newProperty("Security.tempban.maxLoginTries", 8);
|
||||
|
||||
@Comment({"The length of time a IP address will be tempbanned in minutes",
|
||||
"Default: 480 minutes, or 8 hours"})
|
||||
@@ -118,17 +118,17 @@ public final class SecuritySettings implements SettingsHolder {
|
||||
|
||||
@Comment("How many hours is a recovery code valid for?")
|
||||
public static final Property<Integer> RECOVERY_CODE_HOURS_VALID =
|
||||
newProperty("Security.recoveryCode.validForHours", 4);
|
||||
newProperty("Security.recoveryCode.validForHours", 6);
|
||||
|
||||
@Comment("Max number of tries to enter recovery code")
|
||||
public static final Property<Integer> RECOVERY_CODE_MAX_TRIES =
|
||||
newProperty("Security.recoveryCode.maxTries", 3);
|
||||
newProperty("Security.recoveryCode.maxTries", 4);
|
||||
|
||||
@Comment({"How long a player has after password recovery to change their password",
|
||||
"without logging in. This is in minutes.",
|
||||
"Default: 2 minutes"})
|
||||
public static final Property<Integer> PASSWORD_CHANGE_TIMEOUT =
|
||||
newProperty("Security.recoveryCode.passwordChangeTimeout", 2);
|
||||
newProperty("Security.recoveryCode.passwordChangeTimeout", 5);
|
||||
|
||||
@Comment({
|
||||
"Seconds a user has to wait for before a password recovery mail may be sent again",
|
||||
|
||||
Reference in New Issue
Block a user