Finish removing relocated libraries from API

This commit is contained in:
Draycia committed 2023-07-08 17:01:25 -07:00
1 parent 09054b7332
commit 4ce7a46391
28 files changed
+251 -180

No files matched your search

@@ -111,7 +111,7 @@ public final class DSRVChatHook implements ChatHook {
@Override
public void broadcastMessageToChannel(final String channel, final github.scarsz.discordsrv.dependencies.kyori.adventure.text.Component message) {
final String mmFormattedMessage = MiniMessage.miniMessage().serialize(message);
final ChatChannel chatChannel = this.channelRegistry.byCommandName(channel);
final ChatChannel chatChannel = this.channelRegistry.channelByValue(channel);
if (chatChannel == null) {
this.plugin.getLogger().warning("Error sending message from Discord to Minecraft, no matching channel found for [" + channel + "]");
@@ -22,9 +22,9 @@ package net.draycia.carbon.paper.hooks;
import com.google.inject.Inject;
import me.clip.placeholderapi.PlaceholderAPI;
import net.draycia.carbon.api.event.CarbonEventHandler;
import net.draycia.carbon.common.util.ColorUtils;
import net.draycia.carbon.common.event.events.CarbonEarlyChatEvent;
import net.draycia.carbon.common.listeners.Listener;
import net.draycia.carbon.common.util.ColorUtils;
import net.draycia.carbon.paper.CarbonChatPaper;
import net.draycia.carbon.paper.users.CarbonPlayerPaper;
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -64,7 +64,7 @@ public final class DiscordMessageListener implements Listener {
var channel = result.selectedChannel();
if (channel == null) {
channel = this.carbonChat.channelRegistry().defaultValue();
channel = this.carbonChat.channelRegistry().defaultChannel();
}
final var messageType = this.channelMessageTypes.get(channel.key());
@@ -80,10 +80,10 @@ public final class DiscordMessageListener implements Listener {
final @Nullable DiscordService discord = Bukkit.getServicesManager().load(DiscordService.class);
if (discord != null) {
this.carbonChat.channelRegistry().forEach(channel -> {
final MessageType channelMessageType = new MessageType(channel.key().value());
this.carbonChat.channelRegistry().keys().forEach(key -> {
final MessageType channelMessageType = new MessageType(key.value());
discord.registerMessageType(this.plugin, channelMessageType);
this.channelMessageTypes.put(channel.key(), channelMessageType);
this.channelMessageTypes.put(key, channelMessageType);
});
}
}