diff --git a/patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch index fb55e5d5c8..062cc2a5a1 100644 --- a/patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/server/Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -24,9 +24,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (event.callEvent()) { + // If we've failed somehow, let the client know so and go no further. + if (event.isFailed()) { -+ TranslatableComponent chatmessage = new TranslatableComponent(event.getFailMessage()); -+ this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage)); -+ this.connection.disconnect(chatmessage); ++ Component component = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.failMessage()); ++ this.connection.send(new ClientboundLoginDisconnectPacket(component)); ++ this.connection.disconnect(component); + return; + } + diff --git a/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch index 8d9ea9e548..c692c90f35 100644 --- a/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -33,15 +33,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage)); -@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL - if (event.callEvent()) { - // If we've failed somehow, let the client know so and go no further. - if (event.isFailed()) { -- TranslatableComponent chatmessage = new TranslatableComponent(event.getFailMessage()); -+ Component chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(event.getFailMessage(), true)[0]; // Paper - Fix hex colors not working in some kick messages - this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage)); - this.connection.disconnect(chatmessage); - return; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java