diff --git a/src/main/java/net/draycia/carbon/channels/ChatChannel.java b/src/main/java/net/draycia/carbon/channels/ChatChannel.java index 1ab3dbdf..5901c25b 100644 --- a/src/main/java/net/draycia/carbon/channels/ChatChannel.java +++ b/src/main/java/net/draycia/carbon/channels/ChatChannel.java @@ -33,8 +33,20 @@ public abstract class ChatChannel implements ForwardingAudience { */ public abstract Boolean isIgnorable(); + /** + * + * @return If this channel should be synced cross server + * + * @deprecated Use {@link #isCrossServer()} instead + */ + @Deprecated public abstract Boolean shouldBungee(); + /** + * @return If this channel should be synced cross server + */ + public abstract Boolean isCrossServer(); + /** * @return The name of this channel. */ diff --git a/src/main/java/net/draycia/carbon/channels/impls/CarbonChatChannel.java b/src/main/java/net/draycia/carbon/channels/impls/CarbonChatChannel.java index a63452d2..39df21be 100644 --- a/src/main/java/net/draycia/carbon/channels/impls/CarbonChatChannel.java +++ b/src/main/java/net/draycia/carbon/channels/impls/CarbonChatChannel.java @@ -190,7 +190,7 @@ public class CarbonChatChannel extends ChatChannel { // Route message to bungee / discord (if message originates from this server) // Use instanceof and not isOnline, if this message originates from another then the instanceof will // fail, but isOnline may succeed if the player is online on both servers (somehow). - if (user.isOnline() && !fromRemote && shouldBungee()) { + if (user.isOnline() && !fromRemote && (shouldBungee() || isCrossServer())) { sendMessageToBungee(user.asPlayer(), consoleEvent.getComponent()); } @@ -382,8 +382,14 @@ public class CarbonChatChannel extends ChatChannel { } @Override + @Deprecated public Boolean shouldBungee() { - return getBoolean("should-bungee") || getBoolean("is-cross-server"); + return getBoolean("should-bungee"); + } + + @Override + public Boolean isCrossServer() { + return getBoolean("is-cross-server"); } @Override