geforkt von Mirrors/Velocity
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) {
|
private void processServerIp(ByteBufDataInput in) {
|
||||||
proxy.getServer(in.readUTF()).ifPresent(info -> {
|
proxy.getServer(in.readUTF()).ifPresent(info -> {
|
||||||
ByteBuf buf = Unpooled.buffer();
|
ByteBuf buf = Unpooled.buffer();
|
||||||
@ -341,6 +355,9 @@ class BungeeCordMessageResponder {
|
|||||||
case "UUIDOther":
|
case "UUIDOther":
|
||||||
this.processUuidOther(in);
|
this.processUuidOther(in);
|
||||||
break;
|
break;
|
||||||
|
case "IPOther":
|
||||||
|
this.processIpOther(in);
|
||||||
|
break;
|
||||||
case "ServerIP":
|
case "ServerIP":
|
||||||
this.processServerIp(in);
|
this.processServerIp(in);
|
||||||
break;
|
break;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren