Archiviert
1
0

Fix chat no receiver

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-22 15:16:33 +02:00
Ursprung 02fd7eb965
Commit f8232fcb48

Datei anzeigen

@ -88,7 +88,8 @@ public class ChatListener extends BasicListener {
AtomicBoolean noReceiver = new AtomicBoolean(true); AtomicBoolean noReceiver = new AtomicBoolean(true);
receivers.filter(ChatSender::chatShown).forEach(player -> { receivers.filter(ChatSender::chatShown).forEach(player -> {
noReceiver.set(false); if(sender.user().getId() != player.user().getId())
noReceiver.set(false);
chatToReciever(player, user, format, finalMessage); chatToReciever(player, user, format, finalMessage);
}); });
@ -102,7 +103,6 @@ public class ChatListener extends BasicListener {
chatToReciever(ChatSender.discordChannel(SteamwarDiscordBot.instance().getServerTeamChatListener()), user, format, finalMessage); chatToReciever(ChatSender.discordChannel(SteamwarDiscordBot.instance().getServerTeamChatListener()), user, format, finalMessage);
} else if (noReceiver.get()) { } else if (noReceiver.get()) {
sender.system("CHAT_NO_RECEIVER"); sender.system("CHAT_NO_RECEIVER");
//TODO always 1 Receiver (own)
} }
} }