mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
* Fixed a problem of match handling if a player left XMage during sideboarding.
This commit is contained in:
parent
6f9a6ccabf
commit
b770c9d0ab
2 changed files with 3 additions and 2 deletions
|
|
@ -251,7 +251,7 @@ public class User {
|
|||
|
||||
public boolean isExpired(Date expired) {
|
||||
if (lastActivity.before(expired)) {
|
||||
logger.debug(new StringBuilder(userName).append(" is expired!"));
|
||||
logger.debug(userName + " is expired!");
|
||||
return true;
|
||||
}
|
||||
logger.trace(new StringBuilder("isExpired: User ").append(userName).append(" lastActivity: ").append(lastActivity).append(" expired: ").append(expired).toString());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue