diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java index bc8f4993..6bf5b4bd 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/task/FloodgateAuthTask.java @@ -49,7 +49,7 @@ public class FloodgateAuthTask extends FloodgateManagement + * The config option 'non-conflicting' is ignored by this function, as name + * conflicts are checked by a different part of the code. + * + * @param configValue the value of either 'autoLoginFloodgate' or + * 'autoRegisterFloodgate' from config.yml * @return true if the Player can be registered automatically */ - private boolean isAutoRegisterAllowed() { - return "true".equals(autoRegisterFloodgate) - || "no-conflict".equals(autoRegisterFloodgate) // this was checked before - || ("linked".equals(autoRegisterFloodgate) && isLinked); - } - - /** - * Decide if the player can be auto logged in. - * The config option 'non-conflicting' is ignored by this function. - * @return true if the Player can be logged in automatically - */ - protected boolean isAutoLoginAllowed() { - return "true".equals(autoLoginFloodgate) - || "no-conflict".equals(autoRegisterFloodgate) // this was checked before - || ("linked".equals(autoLoginFloodgate) && isLinked); + protected boolean isAutoAuthAllowed(String configValue) { + return "true".equals(configValue) + || "no-conflict".equals(configValue) // this was checked before + || ("linked".equals(configValue) && isLinked); } /**