From f8232fcb48d76bce236bd0e7b45d5ffc74c2f3ce Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 22 Apr 2022 15:16:33 +0200 Subject: [PATCH] Fix chat no receiver Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/ChatListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/ChatListener.java b/src/de/steamwar/bungeecore/listeners/ChatListener.java index 205faad..bd02b3d 100644 --- a/src/de/steamwar/bungeecore/listeners/ChatListener.java +++ b/src/de/steamwar/bungeecore/listeners/ChatListener.java @@ -88,7 +88,8 @@ public class ChatListener extends BasicListener { AtomicBoolean noReceiver = new AtomicBoolean(true); receivers.filter(ChatSender::chatShown).forEach(player -> { - noReceiver.set(false); + if(sender.user().getId() != player.user().getId()) + noReceiver.set(false); chatToReciever(player, user, format, finalMessage); }); @@ -102,7 +103,6 @@ public class ChatListener extends BasicListener { chatToReciever(ChatSender.discordChannel(SteamwarDiscordBot.instance().getServerTeamChatListener()), user, format, finalMessage); } else if (noReceiver.get()) { sender.system("CHAT_NO_RECEIVER"); - //TODO always 1 Receiver (own) } }