From a1e70d43562d525a97328771203ab200fb2b97a4 Mon Sep 17 00:00:00 2001 From: Boy Date: Sun, 2 Jun 2024 16:14:17 +0200 Subject: [PATCH] feat: handle motd packet --- .../kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt b/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt index 2d714a5..a17ab42 100644 --- a/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt +++ b/v1_20_R4/src/main/kotlin/com/mineinabyss/emojy/nms/v1_20_R4/EmojyNMSHandler.kt @@ -44,6 +44,7 @@ class EmojyNMSHandler(emojy: EmojyPlugin) : IEmojyNMSHandler { override fun write(ctx: ChannelHandlerContext, packet: Any, promise: ChannelPromise) { ctx.write( when (packet) { + is ClientboundServerDataPacket -> ClientboundServerDataPacket(packet.motd.transformEmotes(connection.locale()), packet.iconBytes) is ClientboundPlayerChatPacket -> ClientboundPlayerChatPacket(packet.sender, packet.index, packet.signature, packet.body, packet.unsignedContent?.transformEmotes(connection.locale(), true)?.unescapeEmoteIds(), packet.filterMask, packet.chatType) is ClientboundDisguisedChatPacket -> ClientboundDisguisedChatPacket(packet.message.transformEmotes(connection.locale(), true).unescapeEmoteIds(), packet.chatType) is ClientboundSystemChatPacket -> ClientboundSystemChatPacket(packet.content.transformEmotes(connection.locale(), true).unescapeEmoteIds(), packet.overlay)