Update Nukkit Protocol Library to 1.14 (#117)

* Update nukkit protocolib to 1.14

* Fixes

* Remove debug
This commit is contained in:
LegacyGamerHD 2019-12-23 18:47:31 +01:00 committed by Redned
parent cbbc485efa
commit 1f7b8ba5d5
3 changed files with 6 additions and 7 deletions

View file

@ -66,8 +66,8 @@
</dependency>
<dependency>
<groupId>com.nukkitx.protocol</groupId>
<artifactId>bedrock-v388</artifactId>
<version>2.4.2</version>
<artifactId>bedrock-v389</artifactId>
<version>2.4.4</version>
<scope>compile</scope>
</dependency>
<dependency>

View file

@ -27,7 +27,7 @@ package org.geysermc.connector;
import com.nukkitx.protocol.bedrock.BedrockPacketCodec;
import com.nukkitx.protocol.bedrock.BedrockServer;
import com.nukkitx.protocol.bedrock.v388.Bedrock_v388;
import com.nukkitx.protocol.bedrock.v389.Bedrock_v389;
import lombok.Getter;
import org.fusesource.jansi.AnsiConsole;
@ -67,8 +67,7 @@ import java.util.concurrent.TimeUnit;
@Getter
public class GeyserConnector implements Connector {
public static final BedrockPacketCodec BEDROCK_PACKET_CODEC = Bedrock_v388.V388_CODEC;
public static final int BEDROCK_1_14_PROTOCOL_VERSION = 389;
public static final BedrockPacketCodec BEDROCK_PACKET_CODEC = Bedrock_v389.V389_CODEC;
public static final String NAME = "Geyser";
public static final String VERSION = "1.0-SNAPSHOT";

View file

@ -45,7 +45,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
@Override
public boolean handle(LoginPacket loginPacket) {
if (loginPacket.getProtocolVersion() != GeyserConnector.BEDROCK_1_14_PROTOCOL_VERSION) {
if (loginPacket.getProtocolVersion() != GeyserConnector.BEDROCK_PACKET_CODEC.getProtocolVersion()) {
session.getUpstream().disconnect("Unsupported Bedrock version. Are you running an outdated version?");
return true;
}