forked from External/mage
Improved player quits / leaves mage handling for tournaments (not perfect yet, will more improve it).
This commit is contained in:
parent
0d1e45fff6
commit
85b8edf630
12 changed files with 155 additions and 34 deletions
|
|
@ -584,6 +584,17 @@ public class MageServerImpl implements MageServer {
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void quitTournament(final UUID tournamentId, final String sessionId) throws MageException {
|
||||
execute("quitTournament", sessionId, new Action() {
|
||||
@Override
|
||||
public void execute() {
|
||||
UUID userId = SessionManager.getInstance().getSession(sessionId).getUserId();
|
||||
TournamentManager.getInstance().quit(tournamentId, userId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo(final UUID gameId, final String sessionId) throws MageException {
|
||||
execute("undo", sessionId, new Action() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue