mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08: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
|
addGame(); // raises only the number
|
||||||
shufflePlayers();
|
shufflePlayers();
|
||||||
for (MatchPlayer matchPlayer : this.players) {
|
for (MatchPlayer matchPlayer : this.players) {
|
||||||
if (!matchPlayer.hasQuit()) {
|
if (!matchPlayer.hasQuit() && matchPlayer.getDeck() != null) {
|
||||||
matchPlayer.getPlayer().init(game);
|
matchPlayer.getPlayer().init(game);
|
||||||
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
||||||
game.loadCards(matchPlayer.getDeck().getSideboard(), 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());
|
matchPlayer.getPlayer().setPriorityTimeLeft(matchPlayer.getPriorityTimeLeft());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (matchPlayer.getDeck() == null) {
|
||||||
|
logger.error("Match: " + this.getId() + " " + matchPlayer.getName() + " has no deck.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
game.setPriorityTime(options.getPriorityTime());
|
game.setPriorityTime(options.getPriorityTime());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue