forked from TuxCoding/FastLogin
Send login command from proxy immediately
This commit is contained in:
@ -233,9 +233,6 @@ public class ConnectListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
// delay sending force command, because Paper will process the login event asynchronously
|
||||
// In this case it means that the force command (plugin message) is already received and processed while
|
||||
// player is still in the login phase and reported to be offline.
|
||||
Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
|
||||
plugin.getScheduler().runAsync(loginTask);
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import org.geysermc.floodgate.api.player.FloodgatePlayer;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -167,6 +166,6 @@ public class ConnectListener {
|
||||
Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
|
||||
|
||||
// Delay at least one second, otherwise the login command can be missed
|
||||
plugin.getScheduler().runAsyncDelayed(loginTask, Duration.ofSeconds(1));
|
||||
plugin.getScheduler().runAsync(loginTask);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user