forked from External/mage
Added possibility to show tournament panel and watch tournament games (if allowed at tournament start) for spectators .
This commit is contained in:
parent
001f8ec1e6
commit
9838dea551
24 changed files with 520 additions and 311 deletions
|
|
@ -640,6 +640,17 @@ public class MageServerImpl implements MageServer {
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean watchTournamentTable(final String sessionId, final UUID tableId) throws MageException {
|
||||
return executeWithResult("setUserData", sessionId, new ActionWithBooleanResult() {
|
||||
@Override
|
||||
public Boolean execute() throws MageException {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
return TableManager.getInstance().watchTable(userId, tableId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watchGame(final UUID gameId, final String sessionId) throws MageException {
|
||||
execute("watchGame", sessionId, new Action() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue