3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Support Minecraft 1.9.2

Dieser Commit ist enthalten in:
Thinkofname 2016-03-30 16:51:22 +01:00
Ursprung 23ce4d1b96
Commit 7fc5cd856e
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -64,7 +64,7 @@
+ } + }
+ // CraftBukkit end + // CraftBukkit end
+ +
+ if (packethandshakinginsetprotocol.b() > 108) { + if (packethandshakinginsetprotocol.b() > 109) {
chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9"); chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9");
this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext)); this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
this.b.close(chatcomponenttext); this.b.close(chatcomponenttext);

Datei anzeigen

@ -17,7 +17,7 @@
public class PacketStatusListener implements PacketStatusInListener { public class PacketStatusListener implements PacketStatusInListener {
private static final IChatBaseComponent a = new ChatComponentText("Status request has been handled."); private static final IChatBaseComponent a = new ChatComponentText("Status request has been handled.");
@@ -19,8 +30,99 @@ @@ -19,8 +30,101 @@
this.networkManager.close(PacketStatusListener.a); this.networkManager.close(PacketStatusListener.a);
} else { } else {
this.d = true; this.d = true;
@ -109,6 +109,8 @@
+ int version = minecraftServer.getServerPing().getServerData().getProtocolVersion(); + int version = minecraftServer.getServerPing().getServerData().getProtocolVersion();
+ if (this.networkManager.channel.pipeline().get(PacketEncoder.class).version == 108) { + if (this.networkManager.channel.pipeline().get(PacketEncoder.class).version == 108) {
+ version = 108; + version = 108;
+ } else if (this.networkManager.channel.pipeline().get(PacketEncoder.class).version == 109) {
+ version = 109;
+ } + }
+ ping.setServerInfo(new ServerPing.ServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), version)); + ping.setServerInfo(new ServerPing.ServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), version));
+ +