Fixed a problem that general tournament messages (not send by a user) were no longer displayed.

This commit is contained in:
LevelX2 2017-04-15 18:14:39 +02:00
parent d08de1812e
commit f90d49ae0a

View file

@ -27,6 +27,10 @@
*/
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()) {