Implement extended PaperServerListPingEvent

This commit is contained in:
Minecrell
2017-10-11 15:56:26 +02:00
parent a7bc7ca33a
commit ac0c06a72f
6 changed files with 247 additions and 80 deletions

View File

@@ -20,11 +20,13 @@
public class ServerStatusPacketListenerImpl implements ServerStatusPacketListener {
@@ -36,7 +49,108 @@
@@ -36,7 +49,113 @@
this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON);
} else {
this.hasRequestedStatus = true;
- this.connection.send(new ClientboundStatusResponsePacket(this.status));
+ // Paper start - Replace everything
+ /*
+ // CraftBukkit start
+ // this.connection.send(new PacketStatusOutServerInfo(this.status));
+ MinecraftServer server = MinecraftServer.getServer();
@@ -127,6 +129,9 @@
+
+ this.connection.send(new ClientboundStatusResponsePacket(ping));
+ // CraftBukkit end
+ */
+ com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.processRequest(MinecraftServer.getServer(), this.connection);
+ // Paper end
}
}