Add 1.9.1 support.

This commit is contained in:
md_5
2016-03-16 16:49:50 +11:00
committed by Thinkofname
parent 44216f12ed
commit 23ce4d1b96
5 changed files with 71 additions and 11 deletions

View File

@@ -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));
}