-
Bug
-
Resolution: Invalid
-
None
-
1.20.4
-
None
-
Unconfirmed
-
(Unassigned)
On LAN, when a host exits the world, the remaining players do not get disconnected and stay in the world until they timeout.
To reproduce this:
- Open LAN on a world.
- Let another player connect.
- Make the host leave the world.
- The other player will stay on the world until they timeout.
Code issue:
Using yarn mappings, `stop(boolean)` in `IntegratedServer` removes players from the `PlayerManager` using `remove(ServerPlayerEntity)`. `shutdown()` in `MinecraftServer` loops through the players to disconnect them with `disconnectAllPlayers()` in `PlayerManager`. Because `stop(boolean)` is called before `shutdown()`, the player list would be empty, causing players to not be disconnected.
Potential Fix:
In `remove(ServerPlayerEntity)`, check to see if the player is still connected and disconnect them if true.