Added configuration to disable auto logins for 2Factor authentication

(Fixes #65)
This commit is contained in:
games647
2016-09-09 16:52:44 +02:00
parent 5022c9aa7b
commit 8e5da01be0
4 changed files with 25 additions and 5 deletions
@@ -43,6 +43,14 @@ public class ForceLoginTask implements Runnable {
if (pendingConnection.isOnlineMode()) {
boolean autoRegister = session.needsRegistration();
//2fa authentication - no need to send bukkit force login notification and so we also don't need
// to wait for a response -> save immediatly
if (!plugin.getConfig().getBoolean("autoLogin")) {
playerProfile.setPremium(true);
plugin.getCore().getStorage().save(playerProfile);
session.setAlreadySaved(true);
}
BungeeAuthPlugin authPlugin = plugin.getBungeeAuthPlugin();
if (authPlugin == null) {
//save will happen on success message from bukkit