mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2025-02-16 19:59:58 -05:00
Fixed bedrock pinging not working
This commit is contained in:
parent
b33f2ac5fa
commit
8a51d507bb
1 changed files with 5 additions and 3 deletions
|
@ -86,9 +86,11 @@ public class BedrockProxyConnection extends ProxyConnection {
|
|||
private ChannelFuture ping(final ServerAddress serverAddress) {
|
||||
if (this.channelFuture == null) this.initialize(new Bootstrap());
|
||||
|
||||
this.getChannel().pipeline().replace(VLPipeline.VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, "ping_encapsulation", new PingEncapsulationCodec(serverAddress.toSocketAddress()));
|
||||
this.getChannel().pipeline().remove(VLPipeline.VIABEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME);
|
||||
this.getChannel().pipeline().remove(MCPipeline.SIZER_HANDLER_NAME);
|
||||
this.channelFuture.channel().eventLoop().submit(() -> {
|
||||
this.getChannel().pipeline().replace(VLPipeline.VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, "ping_encapsulation", new PingEncapsulationCodec(serverAddress.toSocketAddress()));
|
||||
this.getChannel().pipeline().remove(VLPipeline.VIABEDROCK_PACKET_ENCAPSULATION_HANDLER_NAME);
|
||||
this.getChannel().pipeline().remove(MCPipeline.SIZER_HANDLER_NAME);
|
||||
});
|
||||
|
||||
return this.getChannel().bind(new InetSocketAddress(0));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue