diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java index a14d938a6..071525007 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java @@ -197,6 +197,20 @@ class BungeeCordMessageResponder { }); } + private void processIpOther(ByteBufDataInput in) { + proxy.getPlayer(in.readUTF()).ifPresent(player -> { + ByteBuf buf = Unpooled.buffer(); + ByteBufDataOutput out = new ByteBufDataOutput(buf); + + out.writeUTF("IPOther"); + out.writeUTF(player.getUsername()); + out.writeUTF(player.getRemoteAddress().getHostString()); + out.writeInt(player.getRemoteAddress().getPort()); + + sendResponseOnConnection(buf); + }); + } + private void processServerIp(ByteBufDataInput in) { proxy.getServer(in.readUTF()).ifPresent(info -> { ByteBuf buf = Unpooled.buffer(); @@ -341,6 +355,9 @@ class BungeeCordMessageResponder { case "UUIDOther": this.processUuidOther(in); break; + case "IPOther": + this.processIpOther(in); + break; case "ServerIP": this.processServerIp(in); break;