geforkt von Mirrors/Velocity
Fix tablist header and footer desync (#1103)
Dieser Commit ist enthalten in:
Ursprung
f8cdf4fa1a
Commit
fe052e5163
@ -91,10 +91,9 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(JoinGame packet) {
|
public boolean handle(JoinGame packet) {
|
||||||
MinecraftConnection smc = serverConn.ensureConnected();
|
MinecraftConnection smc = serverConn.ensureConnected();
|
||||||
RegisteredServer previousServer = serverConn.getPreviousServer().orElse(null);
|
final RegisteredServer previousServer = serverConn.getPreviousServer().orElse(null);
|
||||||
VelocityServerConnection existingConnection = serverConn.getPlayer().getConnectedServer();
|
|
||||||
|
|
||||||
final ConnectedPlayer player = serverConn.getPlayer();
|
final ConnectedPlayer player = serverConn.getPlayer();
|
||||||
|
final VelocityServerConnection existingConnection = player.getConnectedServer();
|
||||||
|
|
||||||
if (existingConnection != null) {
|
if (existingConnection != null) {
|
||||||
// Shut down the existing server connection.
|
// Shut down the existing server connection.
|
||||||
@ -103,11 +102,11 @@ public class TransitionSessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
// Send keep alive to try to avoid timeouts
|
// Send keep alive to try to avoid timeouts
|
||||||
player.sendKeepAlive();
|
player.sendKeepAlive();
|
||||||
|
|
||||||
// Reset Tablist header and footer to prevent desync
|
|
||||||
player.clearPlayerListHeaderAndFooter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset Tablist header and footer to prevent desync
|
||||||
|
player.clearPlayerListHeaderAndFooter();
|
||||||
|
|
||||||
// The goods are in hand! We got JoinGame. Let's transition completely to the new state.
|
// The goods are in hand! We got JoinGame. Let's transition completely to the new state.
|
||||||
smc.setAutoReading(false);
|
smc.setAutoReading(false);
|
||||||
server.getEventManager()
|
server.getEventManager()
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren