mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Deprecate shouldBungee, ignore this update
This commit is contained in:
1 parent
5ed153b641
commit
05fa454bac
2 files changed
+20
-2
No files matched your search
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user