mirror of https://github.com/Minestom/Minestom.git
fix: do not process disconnected queued config->play transition players
This commit is contained in:
parent
2a7df1ab55
commit
e18d7fb798
|
@ -12,6 +12,7 @@ import net.minestom.server.MinecraftServer;
|
|||
import net.minestom.server.command.CommandManager;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.server.ServerListPingEvent;
|
||||
import net.minestom.server.extras.MojangAuth;
|
||||
import net.minestom.server.extras.lan.OpenToLAN;
|
||||
import net.minestom.server.extras.lan.OpenToLANConfig;
|
||||
import net.minestom.server.instance.block.BlockManager;
|
||||
|
@ -138,7 +139,7 @@ public class Main {
|
|||
// VelocityProxy.enable("abcdef");
|
||||
//BungeeCordProxy.enable();
|
||||
|
||||
//MojangAuth.init();
|
||||
MojangAuth.init();
|
||||
|
||||
// useful for testing - we don't need to worry about event calls so just set this to a long time
|
||||
OpenToLAN.open(new OpenToLANConfig().eventCallDelay(Duration.of(1, TimeUnit.DAY)));
|
||||
|
|
|
@ -352,6 +352,7 @@ public final class ConnectionManager {
|
|||
@ApiStatus.Internal
|
||||
public void updateWaitingPlayers() {
|
||||
this.waitingPlayers.drain(player -> {
|
||||
if (!player.isOnline()) return; // Player disconnected while in queued to join
|
||||
player.getPlayerConnection().setConnectionState(ConnectionState.PLAY);
|
||||
playPlayers.add(player);
|
||||
keepAlivePlayers.add(player);
|
||||
|
|
Loading…
Reference in New Issue