Fixed version comparisons

This commit is contained in:
RaphiMC 2024-02-14 17:09:53 +01:00
parent 164f229aa0
commit d8aff7f979
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ public abstract class VLLegacyPipeline extends ChannelInboundHandlerAdapter {
this.user.getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthSplitterName(), VIALEGACY_PRE_NETTY_LENGTH_PREPENDER_NAME, this.createViaLegacyPreNettyLengthPrepender());
ctx.pipeline().addBefore(this.lengthPrependerName(), VIALEGACY_PRE_NETTY_LENGTH_REMOVER_NAME, this.createViaLegacyPreNettyLengthRemover());
} else if (this.version.equalTo(BedrockProtocolVersion.bedrockLatest)) {
} else if (this.version.equals(BedrockProtocolVersion.bedrockLatest)) {
this.user.getProtocolInfo().getPipeline().add(BedrockBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthSplitterName(), VIABEDROCK_DISCONNECT_HANDLER_NAME, this.createViaBedrockDisconnectHandler());
ctx.pipeline().addBefore(this.lengthSplitterName(), VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, this.createViaBedrockFrameEncapsulationHandler());

View File

@ -58,7 +58,7 @@ public abstract class VLPipeline extends ChannelInboundHandlerAdapter {
if (this.version.olderThanOrEquals(LegacyProtocolVersion.r1_6_4)) {
this.user.getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthCodecName(), VIALEGACY_PRE_NETTY_LENGTH_CODEC_NAME, this.createViaLegacyPreNettyLengthCodec());
} else if (this.version.equalTo(BedrockProtocolVersion.bedrockLatest)) {
} else if (this.version.equals(BedrockProtocolVersion.bedrockLatest)) {
this.user.getProtocolInfo().getPipeline().add(BedrockBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthCodecName(), VIABEDROCK_DISCONNECT_HANDLER_NAME, this.createViaBedrockDisconnectHandler());
ctx.pipeline().addBefore(this.lengthCodecName(), VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, this.createViaBedrockFrameEncapsulationHandler());