From 9a7617f9b8aa9cce5cc050070dc4c2b3b46a6dbb Mon Sep 17 00:00:00 2001 From: Ruan Date: Sat, 10 Jun 2023 10:01:01 +0200 Subject: [PATCH] #3475: Add KickPlayerRaw channel --- .../net/md_5/bungee/connection/DownstreamBridge.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java index 7c17dde8e..e133d9339 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java @@ -584,6 +584,16 @@ public class DownstreamBridge extends PacketHandler } break; } + case "KickPlayerRaw": + { + ProxiedPlayer player = bungee.getPlayer( in.readUTF() ); + if ( player != null ) + { + BaseComponent[] kickReason = ComponentSerializer.parse( in.readUTF() ); + player.disconnect( kickReason ); + } + break; + } } // Check we haven't set out to null, and we have written data, if so reply back back along the BungeeCord channel