mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Fixed a problem with NPE and match start. Chanes to handling of logging.
This commit is contained in:
parent
f670cb3977
commit
9c1f69983b
4 changed files with 18 additions and 15 deletions
|
|
@ -61,7 +61,7 @@ public class GameStates implements Serializable {
|
|||
states.remove(states.size() - 1);
|
||||
}
|
||||
// return new Copier<GameState>().uncompressCopy(states.get(index));
|
||||
logger.debug("Rolling back state: " + index);
|
||||
logger.trace("Rolling back state: " + index);
|
||||
return states.get(index);
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public abstract class MatchImpl implements Match {
|
|||
|
||||
public MatchImpl(MatchOptions options) {
|
||||
this.options = options;
|
||||
startTime = null;
|
||||
this.startTime = new Date(); // to avaoid null pointer exceptions
|
||||
replayAvailable = false;
|
||||
draws = 0;
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ public abstract class MatchImpl implements Match {
|
|||
|
||||
@Override
|
||||
public boolean hasStarted() {
|
||||
return startTime != null;
|
||||
return startedGames > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue