3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-03 14:50:19 +01:00

Update Nukkit Protocol Library to 1.14 (#117)

* Update nukkit protocolib to 1.14

* Fixes

* Remove debug
Dieser Commit ist enthalten in:
LegacyGamerHD 2019-12-23 18:47:31 +01:00 committet von Redned
Ursprung cbbc485efa
Commit 1f7b8ba5d5
3 geänderte Dateien mit 6 neuen und 7 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -45,7 +45,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
@Override @Override
public boolean handle(LoginPacket loginPacket) { 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?"); session.getUpstream().disconnect("Unsupported Bedrock version. Are you running an outdated version?");
return true; return true;
} }