3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-26 16:12:50 +01:00

Add handling for KickPlayerRaw

Dieser Commit ist enthalten in:
Shane Freeder 2024-07-10 23:00:08 +01:00
Ursprung 5154f02910
Commit 82e81909d8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -260,6 +260,13 @@ public class BungeeCordMessageResponder {
});
}
private void processKickRaw(ByteBufDataInput in) {
proxy.getPlayer(in.readUTF()).ifPresent(player -> {
String kickReason = in.readUTF();
player.disconnect(GsonComponentSerializer.gson().deserialize(kickReason));
});
}
private void processForwardToPlayer(ByteBufDataInput in) {
Optional<Player> player = proxy.getPlayer(in.readUTF());
if (player.isPresent()) {
@ -372,6 +379,9 @@ public class BungeeCordMessageResponder {
case "KickPlayer":
this.processKick(in);
break;
case "KickPlayerRaw":
this.processKickRaw(in);
break;
default:
// Do nothing, unknown command
break;