forked from GeyserMC/Geyser
Update Nukkit Protocol Library to 1.14 (#117)
* Update nukkit protocolib to 1.14 * Fixes * Remove debug
This commit is contained in:
parent
cbbc485efa
commit
1f7b8ba5d5
3 changed files with 6 additions and 7 deletions
|
@ -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>
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -131,4 +131,4 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
|||
public boolean handle(InventoryTransactionPacket packet) {
|
||||
return translateAndDefault(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue