Make channels ForwardingAudiences

This commit is contained in:
Draycia committed 2020-08-10 18:07:45 -07:00
1 parent aeb15ff0f1
commit 24aff39e11
2 files changed
+31 -8

No files matched your search

@@ -2,6 +2,7 @@ package net.draycia.carbon.channels;
import net.draycia.carbon.events.PreChatFormatEvent;
import net.draycia.carbon.storage.ChatUser;
import net.kyori.adventure.audience.ForwardingAudience;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextColor;
import org.jetbrains.annotations.Nullable;
@@ -9,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.regex.Pattern;
public abstract class ChatChannel {
public abstract class ChatChannel implements ForwardingAudience {
/**
* @return The color that represents this channel. Optionally used in formatting.
@@ -83,8 +84,6 @@ public abstract class ChatChannel {
public abstract Boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying);
public abstract List<ChatUser> getAudience(ChatUser user);
/**
* @return If the channel should forward its formatting / formatted message to other servers
*/