13
0
geforkt von Mirrors/Velocity

Implement BungeeCord IPOther message. Fixes #361

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-08-24 10:40:45 -04:00
Ursprung d9b137fc4d
Commit 01158b08a7

Datei anzeigen

@ -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;