mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed some exception problems.
This commit is contained in:
parent
84a815eb73
commit
c401a7f5ea
1 changed files with 5 additions and 1 deletions
|
@ -224,7 +224,7 @@ public abstract class MatchImpl implements Match {
|
|||
addGame(); // raises only the number
|
||||
shufflePlayers();
|
||||
for (MatchPlayer matchPlayer : this.players) {
|
||||
if (!matchPlayer.hasQuit()) {
|
||||
if (!matchPlayer.hasQuit() && matchPlayer.getDeck() != null) {
|
||||
matchPlayer.getPlayer().init(game);
|
||||
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
||||
game.loadCards(matchPlayer.getDeck().getSideboard(), matchPlayer.getPlayer().getId());
|
||||
|
@ -237,6 +237,10 @@ public abstract class MatchImpl implements Match {
|
|||
matchPlayer.getPlayer().setPriorityTimeLeft(matchPlayer.getPriorityTimeLeft());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (matchPlayer.getDeck() == null) {
|
||||
logger.error("Match: " + this.getId() + " " + matchPlayer.getName() + " has no deck.");
|
||||
}
|
||||
}
|
||||
}
|
||||
game.setPriorityTime(options.getPriorityTime());
|
||||
|
|
Loading…
Reference in a new issue