Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +01:00
Implement BungeeCord IPOther message. Fixes #361
Dieser Commit ist enthalten in:
Ursprung
d9b137fc4d
Commit
01158b08a7
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren