SPIGOT-7171: Ability to get the IP/hostname players are requesting status of

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-10-28 20:19:11 +11:00
parent a8d96f30a4
commit 814c67ace8
5 changed files with 25 additions and 29 deletions

View File

@@ -1,6 +1,14 @@
--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -164,7 +164,7 @@
@@ -84,6 +84,7 @@
private float averageSentPackets;
private int tickCount;
private boolean handlingFault;
+ public String hostname = ""; // CraftBukkit - add field
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.receiving = enumprotocoldirection;
@@ -164,7 +165,7 @@
}
private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
@@ -9,7 +17,7 @@
}
public void setListener(PacketListener packetlistener) {
@@ -289,7 +289,7 @@
@@ -289,7 +290,7 @@
public void disconnect(IChatBaseComponent ichatbasecomponent) {
if (this.channel.isOpen()) {