future = Bukkit.getScheduler().callSyncMethod(plugin, () -> {
+ PlayerSession session = LoginSecurity.getSessionManager().getPlayerSession(player);
+ return session.performAction(new RegisterAction(AuthService.PLUGIN, plugin, password)).isSuccess();
+ });
+
+ try {
+ return future.get();
+ } catch (InterruptedException | ExecutionException ex) {
+ plugin.getLog().error("Failed to forceLogin player: {}", player, ex);
+ return false;
+ }
}
}
diff --git a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
index 9b676354..da22fffd 100644
--- a/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
+++ b/core/src/main/java/com/github/games647/fastlogin/core/shared/FastLoginCore.java
@@ -192,7 +192,6 @@ public class FastLoginCore> {
return false;
}
-
public Configuration getConfig() {
return config;
}