Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 0c0aca8

Browse files
committed
Replaced strings with constants
Removed debug message
1 parent bccaae8 commit 0c0aca8

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package de.rexlmanu.viaversionaddon.handler;
22

3+
import lombok.experimental.Accessors;
4+
5+
@Accessors(fluent = true)
36
public class PipelineReorderEvent {
47
}

src/main/java/de/rexlmanu/viaversionaddon/handler/ViaDecodeHandler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf bytebuf, List<Object> o
4747
private void reorder(ChannelHandlerContext ctx) {
4848
int decoderIndex = ctx.pipeline().names().indexOf("decompress");
4949
if (decoderIndex == -1) return;
50-
if (decoderIndex > ctx.pipeline().names().indexOf("via-decoder")) {
51-
ChannelHandler encoder = ctx.pipeline().get("via-encoder");
52-
ChannelHandler decoder = ctx.pipeline().get("via-decoder");
50+
if (decoderIndex > ctx.pipeline().names().indexOf(CommonTransformer.HANDLER_DECODER_NAME)) {
51+
ChannelHandler encoder = ctx.pipeline().get(CommonTransformer.HANDLER_ENCODER_NAME);
52+
ChannelHandler decoder = ctx.pipeline().get(CommonTransformer.HANDLER_DECODER_NAME);
5353
ctx.pipeline().remove(encoder);
5454
ctx.pipeline().remove(decoder);
55-
ctx.pipeline().addAfter("compress", "via-encoder", encoder);
56-
ctx.pipeline().addAfter("decompress", "via-decoder", decoder);
55+
ctx.pipeline().addAfter("compress", CommonTransformer.HANDLER_ENCODER_NAME, encoder);
56+
ctx.pipeline().addAfter("decompress", CommonTransformer.HANDLER_DECODER_NAME, decoder);
5757
}
5858
}
5959
@Override

src/main/java/de/rexlmanu/viaversionaddon/mixin/MixinNetworkManagerInCh.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class MixinNetworkManagerInCh {
2020
@Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false)
2121
private void onInitChannel(Channel channel, CallbackInfo ci) {
2222
if (channel instanceof SocketChannel && ViaVersionAddon.SHARED_VERSION != ViaVersionAddon.getInstance().getVersion()) {
23-
System.out.println("its working");
2423

2524
UserConnection user = new UserConnectionImpl(channel, true);
2625
new ProtocolPipelineImpl(user);

0 commit comments

Comments
 (0)