forked from External/mage
talk to interfaces rather than implementations
This commit is contained in:
parent
0c80172c2d
commit
905829561e
32 changed files with 259 additions and 299 deletions
|
|
@ -36,10 +36,7 @@ import mage.view.ChatMessage.SoundToPlay;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
|
|
@ -119,7 +116,7 @@ public class ChatSession {
|
|||
|
||||
public void broadcast(String userName, String message, MessageColor color, boolean withTime, MessageType messageType, SoundToPlay soundToPlay) {
|
||||
if (!message.isEmpty()) {
|
||||
HashSet<UUID> clientsToRemove = new HashSet<>();
|
||||
Set<UUID> clientsToRemove = new HashSet<>();
|
||||
ClientCallback clientCallback = new ClientCallback(ClientCallbackMethod.CHATMESSAGE, chatId, new ChatMessage(userName, message, (withTime ? timeFormatter.format(new Date()) : ""), color, messageType, soundToPlay));
|
||||
for (UUID userId : clients.keySet()) {
|
||||
Optional<User> user = UserManager.instance.getUser(userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue