diff --git a/docs/config.md b/docs/config.md index 99e428dfe..212d83a7d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1,5 +1,5 @@ - + ## AuthMe Configuration The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder, @@ -199,9 +199,10 @@ settings: noTeleport: false # Regex syntax for allowed chars in passwords allowedPasswordCharacters: '[\x21-\x7E]*' - # Threshold of the other accounts command, a value less than 1 means disabled. + # Threshold of the other accounts command, a value less than 2 means disabled. otherAccountsCmdThreshold: 0 - # The other accounts command, available variables: %playername%, %playerip% + # Command to run when a user has more accounts than the configured threshold. + # Available variables: %playername%, %playerip% otherAccountsCmd: 'say The player %playername% with ip %playerip% has multiple accounts!' # Log level: INFO, FINE, DEBUG. Use INFO for general messages, # FINE for some additional detailed ones (like password failed), @@ -463,4 +464,4 @@ To change settings on a running server, save your changes to config.yml and use --- -This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Nov 13 12:06:04 CET 2016 +This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sun Nov 13 13:34:49 CET 2016 diff --git a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java index 2002232db..a3fa70100 100644 --- a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java @@ -259,7 +259,7 @@ public class AsynchronousLogin implements AsynchronousProcess { int threshold = service.getProperty(RestrictionSettings.OTHER_ACCOUNTS_CMD_THRESHOLD); String command = service.getProperty(RestrictionSettings.OTHER_ACCOUNTS_CMD); - if(threshold <= 1 || command.isEmpty()) { + if(threshold < 2 || command.isEmpty()) { return; } diff --git a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java index 3fb681913..7f426b1d6 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java @@ -187,11 +187,14 @@ public class RestrictionSettings implements SettingsHolder { public static final Property> UNRESTRICTED_NAMES = newLowercaseListProperty("settings.unrestrictions.UnrestrictedName"); - @Comment("Threshold of the other accounts command, a value less than 1 means disabled.") + @Comment("Threshold of the other accounts command, a value less than 2 means disabled.") public static final Property OTHER_ACCOUNTS_CMD_THRESHOLD = newProperty("settings.restrictions.otherAccountsCmdThreshold", 0); - @Comment("The other accounts command, available variables: %playername%, %playerip%") + @Comment({ + "Command to run when a user has more accounts than the configured threshold.", + "Available variables: %playername%, %playerip%" + }) public static final Property OTHER_ACCOUNTS_CMD = newProperty("settings.restrictions.otherAccountsCmd", "say The player %playername% with ip %playerip% has multiple accounts!");