From 23ce4d1b96edfbd47c7ad400b233fefb5a55dd64 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 16 Mar 2016 16:49:50 +1100 Subject: Add 1.9.1 support. --- nms-patches/PacketStatusListener.patch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nms-patches/PacketStatusListener.patch') diff --git a/nms-patches/PacketStatusListener.patch b/nms-patches/PacketStatusListener.patch index e660bf8b..90ef2261 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,95 @@ +@@ -19,8 +30,99 @@ this.networkManager.close(PacketStatusListener.a); } else { this.d = true; @@ -106,7 +106,11 @@ + ping.setFavicon(event.icon.value); + ping.setMOTD(new ChatComponentText(event.getMotd())); + ping.setPlayerSample(playerSample); -+ ping.setServerInfo(new ServerPing.ServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), minecraftServer.getServerPing().getServerData().getProtocolVersion())); ++ int version = minecraftServer.getServerPing().getServerData().getProtocolVersion(); ++ if (this.networkManager.channel.pipeline().get(PacketEncoder.class).version == 108) { ++ version = 108; ++ } ++ ping.setServerInfo(new ServerPing.ServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), version)); + + this.networkManager.sendPacket(new PacketStatusOutServerInfo(ping)); } -- cgit v1.2.3