Skip to content

Commit e7639d0

Browse files
committed
fix(AuthCommand): run onAuthenticate synchronously
1 parent d550c3b commit e7639d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/elchologamer/userlogin/command/AuthCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public final boolean asyncRun(CommandSender sender, String label, String[] args)
4040
if (args.length < minArgs) return false;
4141

4242
// Authenticate player
43-
if (authenticate(ulPlayer, args)) ulPlayer.onAuthenticate(type);
43+
if (authenticate(ulPlayer, args)) {
44+
getPlugin().getServer().getScheduler().runTask(getPlugin(), () -> ulPlayer.onAuthenticate(type));
45+
}
4446

4547
return true;
4648
}

0 commit comments

Comments
 (0)