@@ -120,7 +120,7 @@ Here is an example implementation:
120120public class CustomVLPipeline extends VLPipeline {
121121
122122 public CustomVLPipeline (UserConnection connection ) {
123- super (user );
123+ super (connection );
124124 }
125125
126126 // Replace these with the names of your pipeline components
@@ -146,21 +146,21 @@ The same can be done for the `VLLegacyPipeline` with similar functions for the d
146146Then you can add the Via * pipeline to your netty pipeline:
147147```java
148148final UserConnection connection = new UserConnectionImpl (channel, true /* clientside or serverside*/ );
149- new ProtocolPipelineImpl (user );
149+ new ProtocolPipelineImpl (connection );
150150
151- channel. pipeline(). addLast(new CustomVLPipeline (user ));
151+ channel. pipeline(). addLast(new CustomVLPipeline (connection ));
152152```
153153
154154Both `VLPipeline ` and `VLLegacyPipeline ` contain various functions allowing you to modify/ wrap the existing pipeline elements,
155155if you need a more complex/ dynamic pipeline setup you can also manually add the Via * handlers to the pipeline.
156156Here is an example implementation:
157157```java
158158final UserConnection connection = new UserConnectionImpl (channel, true /* clientside or serverside*/ );
159- new ProtocolPipelineImpl (user );
159+ new ProtocolPipelineImpl (connection );
160160
161- // channel.pipeline().addBefore("packet_decoder", VLLegacyPipeline.VIA_DECODER_NAME, new ViaDecoder(user ));
162- // channel.pipeline().addBefore("packet_encoder", VLLegacyPipeline.VIA_ENCODER_NAME, new ViaEncoder(user ));
163- channel. pipeline(). addBefore(" packet_codec" , VLPipeline . VIA_CODEC_NAME , new ViaCodec (user ));
161+ // channel.pipeline().addBefore("packet_decoder", VLLegacyPipeline.VIA_DECODER_NAME, new ViaDecoder(connection ));
162+ // channel.pipeline().addBefore("packet_encoder", VLLegacyPipeline.VIA_ENCODER_NAME, new ViaEncoder(connection ));
163+ channel. pipeline(). addBefore(" packet_codec" , VLPipeline . VIA_CODEC_NAME , new ViaCodec (connection ));
164164```
165165If you are using ViaLegacy , you should read its [README ](https: // github.com/ViaVersion/ViaLegacy?tab=readme-ov-file#vialegacy) to see what changes you need to make to the netty pipeline for it to work.
166166
0 commit comments