From 6e5287443e8283fcde066c65c3ff8a5cd1868b73 Mon Sep 17 00:00:00 2001 From: Boy Date: Fri, 9 Feb 2024 10:45:17 +0100 Subject: [PATCH] fix: make discord to mc send correct message, not entire pluginMessage component --- .../kotlin/com/mineinabyss/chatty/listeners/DiscordListener.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/DiscordListener.kt b/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/DiscordListener.kt index 18d28d3..d2abf94 100644 --- a/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/DiscordListener.kt +++ b/chatty-paper/src/main/kotlin/com/mineinabyss/chatty/listeners/DiscordListener.kt @@ -38,7 +38,7 @@ class DiscordListener { val message = if (chatty.config.chat.formatURLs) handleUrlReplacements(minecraftMessage.toComponent(), null).toComponentDSV() else minecraftMessage val minecraftMessage = ComponentDSV.textOfChildren(senderName, channelId, message, simpleMessage) chatty.plugin.server.sendPluginMessage(chatty.plugin, chattyProxyChannel, gson.serialize(minecraftMessage).toByteArray()) - setMinecraftMessage(minecraftMessage) + setMinecraftMessage(message) } private fun ComponentDSV.toComponent() = mm.serialize(this).miniMsg()