mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
Message of the Day.
This commit is contained in:
parent
60511e4310
commit
6c144b5fc2
7 changed files with 265 additions and 86 deletions
|
|
@ -120,5 +120,7 @@ public interface MageServer {
|
|||
public List<UserView> getUsers(String sessionId) throws MageException;
|
||||
public void disconnectUser(String sessionId, String userSessionId) throws MageException;
|
||||
public void removeTable(String sessionId, UUID tableId) throws MageException;
|
||||
|
||||
|
||||
// messages of the day
|
||||
public Object getServerMessagesCompressed(String sessionId) throws MageException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import mage.interfaces.MageClient;
|
|||
import mage.interfaces.MageServer;
|
||||
import mage.interfaces.ServerState;
|
||||
import mage.interfaces.callback.ClientCallback;
|
||||
import mage.utils.CompressUtil;
|
||||
import mage.view.DraftPickView;
|
||||
import mage.view.GameTypeView;
|
||||
import mage.view.TableView;
|
||||
|
|
@ -838,6 +839,18 @@ public class Session {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<String> getServerMessages() {
|
||||
try {
|
||||
if (isConnected())
|
||||
return (List<String>) CompressUtil.decompress(server.getServerMessagesCompressed(sessionId));
|
||||
} catch (MageException ex) {
|
||||
handleMageException(ex);
|
||||
} catch (Throwable t) {
|
||||
handleThrowable(t);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean disconnectUser(String userSessionId) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue