forked from TuxCoding/FastLogin
Do not encapsulate the task twice in Velocity
This commit is contained in:
@ -166,7 +166,7 @@ public class ConnectListener {
|
|||||||
// player is still in the login phase and reported to be offline.
|
// player is still in the login phase and reported to be offline.
|
||||||
Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
|
Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
|
||||||
plugin.getProxy().getScheduler()
|
plugin.getProxy().getScheduler()
|
||||||
.buildTask(plugin, () -> plugin.getScheduler().runAsync(loginTask))
|
.buildTask(plugin, loginTask)
|
||||||
.delay(1L, TimeUnit.SECONDS) // Delay at least one second, otherwise the login command can be missed
|
.delay(1L, TimeUnit.SECONDS) // Delay at least one second, otherwise the login command can be missed
|
||||||
.schedule();
|
.schedule();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user