diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/ChattyChatIntegration.java b/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/ChattyChatIntegration.java index a9df93a0..4782358e 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/ChattyChatIntegration.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/ChattyChatIntegration.java @@ -28,6 +28,7 @@ import com.discordsrv.common.component.util.ComponentUtil; import com.discordsrv.common.logging.NamedLogger; import com.discordsrv.common.module.type.PluginIntegration; import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer; +import net.kyori.adventure.text.Component; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; @@ -129,7 +130,10 @@ public class ChattyChatIntegration extends PluginIntegration i @Override public void sendMessage(@NotNull MinecraftComponent component) { - chat.sendMessage(BukkitComponentSerializer.legacy().serialize(ComponentUtil.fromAPI(component))); + Component comp = ComponentUtil.fromAPI(component); + for (Player recipient : chat.getRecipients(null)) { + discordSRV.playerProvider().player(recipient).sendMessage(comp); + } } } } diff --git a/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/LunaChatIntegration.java b/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/LunaChatIntegration.java index 5181821a..5bf5352f 100644 --- a/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/LunaChatIntegration.java +++ b/bukkit/src/main/java/com/discordsrv/bukkit/integration/chat/LunaChatIntegration.java @@ -34,6 +34,8 @@ import com.github.ucchyocean.lc3.channel.Channel; import com.github.ucchyocean.lc3.member.ChannelMember; import com.github.ucchyocean.lc3.member.ChannelMemberPlayer; import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer; +import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer; +import net.md_5.bungee.api.chat.BaseComponent; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; @@ -145,8 +147,10 @@ public class LunaChatIntegration extends PluginIntegration imp @Override public void sendMessage(@NotNull MinecraftComponent component) { - String message = BukkitComponentSerializer.legacy().serialize(ComponentUtil.fromAPI(component)); - channel.chatFromOtherSource("Discord", null, message); + BaseComponent[] baseComponent = BungeeComponentSerializer.get().serialize(ComponentUtil.fromAPI(component)); + for (ChannelMember member : channel.getMembers()) { + member.sendMessage(baseComponent); + } } }