13
0
geforkt von Mirrors/Velocity

Fixed Legacy Ping handling (#1180)

Dieser Commit ist enthalten in:
Adrian 2024-01-11 01:57:03 -05:00 committet von GitHub
Ursprung 408b420af7
Commit cc906000bc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -362,8 +362,17 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
ensureInEventLoop(); ensureInEventLoop();
this.state = state; this.state = state;
this.channel.pipeline().get(MinecraftEncoder.class).setState(state); // If the connection is LEGACY (<1.6), the decoder and encoder are not set.
this.channel.pipeline().get(MinecraftDecoder.class).setState(state); final MinecraftEncoder minecraftEncoder = this.channel.pipeline()
.get(MinecraftEncoder.class);
if (minecraftEncoder != null) {
minecraftEncoder.setState(state);
}
final MinecraftDecoder minecraftDecoder = this.channel.pipeline()
.get(MinecraftDecoder.class);
if (minecraftDecoder != null) {
minecraftDecoder.setState(state);
}
if (state == StateRegistry.CONFIG) { if (state == StateRegistry.CONFIG) {
// Activate the play packet queue // Activate the play packet queue