mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Fix compilation
This commit is contained in:
1 parent
35ab8ec954
commit
901e243d1e
7 files changed
+42
-27
No files matched your search
+28
@@ -2,6 +2,7 @@ package net.draycia.carbon.common.channels;
|
||||
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
import net.draycia.carbon.api.config.ChannelOptions;
|
||||
import net.draycia.carbon.api.users.ConsoleUser;
|
||||
import net.draycia.carbon.common.utils.ColorUtils;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.events.misc.CarbonEvents;
|
||||
@@ -188,6 +189,7 @@ public class CarbonChatChannel implements ChatChannel {
|
||||
"server", this.carbonChat.carbonSettings().serverName(),
|
||||
"message", consoleFormatEvent.message());
|
||||
|
||||
// TODO: add ConsoleUser to users map
|
||||
final ChatComponentEvent consoleEvent = new ChatComponentEvent(user, null, this, consoleFormat,
|
||||
consoleFormatEvent.message());
|
||||
|
||||
@@ -200,6 +202,32 @@ public class CarbonChatChannel implements ChatChannel {
|
||||
return users;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendComponents(final @NonNull Map<ChatUser, Component> components) {
|
||||
for (final Map.Entry<ChatUser, Component> entry : components.entrySet()) {
|
||||
if (entry.getValue().equals(TextComponent.empty())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
entry.getKey().sendMessage(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendComponentsAndLog(final @NonNull Map<ChatUser, Component> components) {
|
||||
for (final Map.Entry<ChatUser, Component> entry : components.entrySet()) {
|
||||
if (entry.getValue().equals(TextComponent.empty())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
entry.getKey().sendMessage(entry.getValue());
|
||||
|
||||
if (entry instanceof ConsoleUser) {
|
||||
this.carbonChat.messageProcessor().audiences().console().sendMessage(entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Map<ChatUser, Component> parseMessage(final @NonNull ChatUser user, final @NonNull String message, final boolean fromRemote) {
|
||||
|
||||
Reference in new issue
Block a user