diff options
author | Thinkofname <thinkofdeath@spigotmc.org> | 2016-03-30 16:51:22 +0100 |
---|---|---|
committer | Thinkofname <thinkofdeath@spigotmc.org> | 2016-03-30 16:58:31 +0100 |
commit | 7fc5cd856e46182e727f383a911ffa46326611f1 (patch) | |
tree | a21004e9ff35dbfc7809259873e2aee7be03a08d | |
parent | 23ce4d1b96edfbd47c7ad400b233fefb5a55dd64 (diff) | |
download | craftbukkit-7fc5cd856e46182e727f383a911ffa46326611f1.tar craftbukkit-7fc5cd856e46182e727f383a911ffa46326611f1.tar.gz craftbukkit-7fc5cd856e46182e727f383a911ffa46326611f1.tar.lz craftbukkit-7fc5cd856e46182e727f383a911ffa46326611f1.tar.xz craftbukkit-7fc5cd856e46182e727f383a911ffa46326611f1.zip |
Support Minecraft 1.9.2
-rw-r--r-- | nms-patches/HandshakeListener.patch | 2 | ||||
-rw-r--r-- | nms-patches/PacketStatusListener.patch | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/nms-patches/HandshakeListener.patch b/nms-patches/HandshakeListener.patch index 4798ca8a..081af021 100644 --- a/nms-patches/HandshakeListener.patch +++ b/nms-patches/HandshakeListener.patch @@ -64,7 +64,7 @@ + } + // CraftBukkit end + -+ if (packethandshakinginsetprotocol.b() > 108) { ++ if (packethandshakinginsetprotocol.b() > 109) { chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.9"); this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext)); this.b.close(chatcomponenttext); diff --git a/nms-patches/PacketStatusListener.patch b/nms-patches/PacketStatusListener.patch index 90ef2261..408a67d8 100644 --- a/nms-patches/PacketStatusListener.patch +++ b/nms-patches/PacketStatusListener.patch @@ -17,7 +17,7 @@ public class PacketStatusListener implements PacketStatusInListener { 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); } else { this.d = true; @@ -109,6 +109,8 @@ + int version = minecraftServer.getServerPing().getServerData().getProtocolVersion(); + if (this.networkManager.channel.pipeline().get(PacketEncoder.class).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)); + |