summaryrefslogtreecommitdiffstats
path: root/nms-patches/PacketStatusListener.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/PacketStatusListener.patch')
-rw-r--r--nms-patches/PacketStatusListener.patch8
1 files changed, 6 insertions, 2 deletions
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));
}