diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index aaefdc23..6915b552 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -1,7 +1,9 @@ package net.md_5.bungee; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.DataInputStream; +import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.InetSocketAddress; @@ -413,6 +415,15 @@ public class UserConnection extends GenericConnection implements ProxiedPlayer break outer; } break; + case "IP": + ByteArrayOutputStream b = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(b); + out.writeUTF("IP"); + out.writeUTF(name); + out.writeUTF(getAddress().getHostString()); + out.writeInt(getAddress().getPort()); + getServer().sendData("BungeeCord", b.toByteArray()); + break; } } }