mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Fix cross server messages
This commit is contained in:
1 parent
169c911f64
commit
8dd08c2389
2 files changed
+4
-4
No files matched your search
@@ -139,10 +139,10 @@ 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() && fromBungee) {
|
||||
if (shouldForwardFormatting() && shouldBungee()) {
|
||||
if (user.isOnline() && !fromBungee && shouldBungee()) {
|
||||
if (shouldForwardFormatting()) {
|
||||
sendMessageToBungee(user.asPlayer(), componentEvent.getComponent());
|
||||
} else if (shouldBungee()) {
|
||||
} else {
|
||||
sendMessageToBungee(user.asPlayer(), message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class PluginMessageManager implements PluginMessageListener {
|
||||
public void sendComponent(ChatChannel chatChannel, Player player, Component component) {
|
||||
ByteArrayDataOutput msg = ByteStreams.newDataOutput();
|
||||
|
||||
msg.writeUTF(chatChannel.getName());
|
||||
msg.writeUTF(chatChannel.getKey());
|
||||
msg.writeUTF(player.getUniqueId().toString());
|
||||
msg.writeUTF(MiniMessage.get().serialize(component));
|
||||
|
||||
|
||||
Reference in new issue
Block a user