mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Add 1.9.1 support.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user