* Fixed a problem of match handling if a player left XMage during sideboarding.

This commit is contained in:
LevelX2 2014-09-04 12:30:43 +02:00
parent 6f9a6ccabf
commit b770c9d0ab
2 changed files with 3 additions and 2 deletions

View file

@ -93,13 +93,14 @@ public abstract class MatchImpl implements Match {
public boolean leave(UUID playerId) {
MatchPlayer mPlayer = getPlayer(playerId);
if (mPlayer != null) {
if (games.isEmpty() ) {
if (startedGames == 0) {
return players.remove(mPlayer);
}
mPlayer.setQuit(true);
synchronized (this) {
this.notifyAll();
}
checkIfMatchEnds();
return true;
}
return false;