mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
fix deprecation warning in DSRV integration
This commit is contained in:
2 files changed
+18
-10
No files matched your search
@@ -23,7 +23,6 @@ import net.draycia.carbon.api.CarbonChatProvider;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
public final class ChannelUtils {
|
||||
|
||||
@@ -31,14 +30,13 @@ public final class ChannelUtils {
|
||||
|
||||
}
|
||||
|
||||
public static void broadcastMessageToChannel(final String mmFormattedMessage, final ChatChannel channel) {
|
||||
final Component originalMessage = MiniMessage.miniMessage().deserialize(mmFormattedMessage);
|
||||
public static void broadcastMessageToChannel(final Component msg, final ChatChannel channel) {
|
||||
|
||||
// TODO: Emit events
|
||||
|
||||
for (final CarbonPlayer recipient : CarbonChatProvider.carbonChat().server().players()) {
|
||||
if (channel.hearingPermitted(recipient).permitted()) {
|
||||
recipient.sendMessage(originalMessage);
|
||||
recipient.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user