mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-04-01 17:25:46 +02:00
Ensure pipeline parts exist before injecting #1168
This commit is contained in:
parent
a016eade01
commit
c5ba5b4647
@ -30,6 +30,9 @@ public class BungeeChannelInitializer extends ChannelInitializer<SocketChannel>
|
||||
new ProtocolPipeline(info);
|
||||
// Add originals
|
||||
this.method.invoke(this.original, socketChannel);
|
||||
|
||||
if (socketChannel.pipeline().get("packet-encoder") == null) return; // Don't inject if no packet-encoder
|
||||
if (socketChannel.pipeline().get("packet-decoder") == null) return; // Don't inject if no packet-decoder
|
||||
// Add our transformers
|
||||
BungeeEncodeHandler encoder = new BungeeEncodeHandler(info);
|
||||
BungeeDecodeHandler decoder = new BungeeDecodeHandler(info);
|
||||
|
Loading…
Reference in New Issue
Block a user