Skip to content
This repository was archived by the owner on Jan 17, 2026. It is now read-only.

Commit ee5a80b

Browse files
code cleanup
1 parent 26468ed commit ee5a80b

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/main/java/de/florianmichael/vialoadingbase/netty/VLBPipeline.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import io.netty.channel.ChannelInboundHandlerAdapter;
2727

2828
public abstract class VLBPipeline extends ChannelInboundHandlerAdapter {
29-
public static final String VIA_DECODER_HANDLER_NAME = "via-decoder";
30-
public static final String VIA_ENCODER_HANDLER_NAME = "via-encoder";
29+
public final static String VIA_DECODER_HANDLER_NAME = "via-decoder";
30+
public final static String VIA_ENCODER_HANDLER_NAME = "via-encoder";
3131

3232
private final UserConnection info;
3333

src/main/java/de/florianmichael/vialoadingbase/netty/handler/VLBViaDecodeHandler.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@
3333

3434
@ChannelHandler.Sharable
3535
public class VLBViaDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
36-
private final UserConnection info;
36+
private final UserConnection user;
3737

38-
public VLBViaDecodeHandler(UserConnection info) {
39-
this.info = info;
38+
public VLBViaDecodeHandler(UserConnection user) {
39+
this.user = user;
4040
}
4141

4242
@Override
4343
protected void decode(ChannelHandlerContext ctx, ByteBuf bytebuf, List<Object> out) throws Exception {
44-
if (!info.checkIncomingPacket()) throw CancelDecoderException.generate(null);
45-
if (!info.shouldTransformPacket()) {
44+
if (!user.checkIncomingPacket()) throw CancelDecoderException.generate(null);
45+
if (!user.shouldTransformPacket()) {
4646
out.add(bytebuf.retain());
4747
return;
4848
}
4949

5050
ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
5151
try {
52-
info.transformIncoming(transformedBuf, CancelDecoderException::generate);
52+
user.transformIncoming(transformedBuf, CancelDecoderException::generate);
5353

5454
out.add(transformedBuf.retain());
5555
} finally {
@@ -62,7 +62,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E
6262
if (PipelineUtil.containsCause(cause, CancelCodecException.class)) return;
6363

6464
if ((PipelineUtil.containsCause(cause, InformativeException.class)
65-
&& info.getProtocolInfo().getState() != State.HANDSHAKE)
65+
&& user.getProtocolInfo().getState() != State.HANDSHAKE)
6666
|| Via.getManager().debugHandler().enabled()) {
6767
cause.printStackTrace();
6868
}

src/main/java/de/florianmichael/vialoadingbase/netty/handler/VLBViaEncodeHandler.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@
3030

3131
@ChannelHandler.Sharable
3232
public class VLBViaEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
33-
private final UserConnection info;
33+
private final UserConnection user;
3434

35-
public VLBViaEncodeHandler(UserConnection info) {
36-
this.info = info;
35+
public VLBViaEncodeHandler(UserConnection user) {
36+
this.user = user;
3737
}
3838

3939
@Override
4040
protected void encode(final ChannelHandlerContext ctx, ByteBuf bytebuf, List<Object> out) throws Exception {
41-
if (!info.checkOutgoingPacket()) throw CancelEncoderException.generate(null);
42-
if (!info.shouldTransformPacket()) {
41+
if (!user.checkOutgoingPacket()) throw CancelEncoderException.generate(null);
42+
if (!user.shouldTransformPacket()) {
4343
out.add(bytebuf.retain());
4444
return;
4545
}
4646

4747
ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf);
4848
try {
49-
info.transformOutgoing(transformedBuf, CancelEncoderException::generate);
49+
user.transformOutgoing(transformedBuf, CancelEncoderException::generate);
5050

5151
out.add(transformedBuf.retain());
5252
} finally {

src/main/java/de/florianmichael/vialoadingbase/platform/viaversion/VLBViaConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class VLBViaConfig extends AbstractViaConfig {
2929

3030
// Stolen from Sponge
31-
private static final List<String> UNSUPPORTED = Arrays.asList("anti-xray-patch", "bungee-ping-interval",
31+
private final static List<String> UNSUPPORTED = Arrays.asList("anti-xray-patch", "bungee-ping-interval",
3232
"bungee-ping-save", "bungee-servers", "quick-move-action-fix", "nms-player-ticking",
3333
"velocity-ping-interval", "velocity-ping-save", "velocity-servers",
3434
"blockconnection-method", "change-1_9-hitbox", "change-1_14-hitbox",

0 commit comments

Comments
 (0)