Fixed a problem that general tournament messages (not send by a user) were no longer displayed.
*/
package mage.server;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.server.exceptions.UserNotFoundException;
@@ -36,11 +40,6 @@ import mage.view.ChatMessage.MessageType;
import mage.view.ChatMessage.SoundToPlay;
import org.apache.log4j.Logger;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
/**
* @author BetaSteward_at_googlemail.com
*/
@@ -114,7 +113,7 @@ public enum ChatManager {
}
}
- if (messageType != MessageType.GAME) {
+ if (messageType != MessageType.GAME && !userName.isEmpty()) {
Optional<User> u = UserManager.instance.getUserByName(userName);
if (u.isPresent()) {
