forked from External/mage
* Fixed bug of player handling if player left during sideboarding. Added player info to show if tournament player is in sideboarding state.
This commit is contained in:
parent
791cc828c4
commit
6db39452cd
4 changed files with 42 additions and 16 deletions
|
|
@ -191,13 +191,8 @@ public class TableManager {
|
|||
public void userQuitTournamentSubTables(UUID tournamentId, UUID userId) {
|
||||
for (TableController controller: controllers.values()) {
|
||||
if (controller.getTable().isTournamentSubTable() && controller.getTable().getTournament().getId().equals(tournamentId)) {
|
||||
if (controller.isPlayer(userId)) {
|
||||
Match match = controller.getTable().getMatch();
|
||||
if (match != null) {
|
||||
if (!match.hasEnded() && match.getGame() != null) {
|
||||
GameManager.getInstance().quitMatch(match.getGame().getId(), userId);
|
||||
}
|
||||
}
|
||||
if (controller.hasPlayer(userId)) {
|
||||
controller.leaveTable(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue