Move autoLoginFloodgate check to a common function

Reduces duplicate code.
Added missing check for "no-conflict".
This commit is contained in:
Smart123s
2022-02-25 18:00:21 +01:00
parent 033fdd55ae
commit 817eedd4ac
3 changed files with 13 additions and 7 deletions
@@ -49,8 +49,7 @@ public class FloodgateAuthTask extends FloodgateManagement<Player, CommandSender
BukkitLoginSession session = new BukkitLoginSession(player.getName(), isRegistered, profile);
// enable auto login based on the value of 'autoLoginFloodgate' in config.yml
session.setVerified(autoLoginFloodgate.equals("true")
|| (autoLoginFloodgate.equals("linked") && isLinked));
session.setVerified(isAutoLoginAllowed());
// run login task
Runnable forceLoginTask = new ForceLoginTask(core.getPlugin().getCore(), player, session);