forked from External/mage
Fixed local server time in client's chat messages
This commit is contained in:
parent
bc3274b144
commit
ccd121277a
5 changed files with 23 additions and 17 deletions
|
|
@ -7,7 +7,6 @@ import mage.interfaces.callback.ClientCallback;
|
|||
import mage.interfaces.callback.ClientCallbackMethod;
|
||||
import mage.view.ChatMessage;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Optional;
|
||||
import java.util.StringTokenizer;
|
||||
|
|
@ -15,8 +14,6 @@ import java.util.UUID;
|
|||
|
||||
public final class LocalCommands {
|
||||
|
||||
private static final DateFormat timeFormatter = DateFormat.getTimeInstance(DateFormat.SHORT);
|
||||
|
||||
/**
|
||||
* Handler for commands that do not require server interaction, i.e settings etc
|
||||
* @param chatId
|
||||
|
|
@ -60,7 +57,7 @@ public final class LocalCommands {
|
|||
private static void displayLocalCommandResponse(UUID chatId, String response) {
|
||||
final String text = new StringBuilder().append("<font color=yellow>").append(response).append("</font>").toString();
|
||||
ClientCallback chatMessage = new ClientCallback(ClientCallbackMethod.CHATMESSAGE, chatId,
|
||||
new ChatMessage("", text, timeFormatter.format(new Date()), ChatMessage.MessageColor.BLUE));
|
||||
new ChatMessage("", text, new Date(), ChatMessage.MessageColor.BLUE));
|
||||
MageFrame.getInstance().processCallback(chatMessage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue