mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
fixed tournament not starting error
This commit is contained in:
parent
c4a3a496aa
commit
952b46bc1f
7 changed files with 22 additions and 8 deletions
|
|
@ -36,6 +36,7 @@ import java.util.Map;
|
|||
import mage.game.tournament.Tournament;
|
||||
import mage.game.tournament.TournamentOptions;
|
||||
import mage.game.tournament.TournamentType;
|
||||
import mage.sets.Sets;
|
||||
import mage.view.TournamentTypeView;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -64,6 +65,9 @@ public class TournamentFactory {
|
|||
try {
|
||||
con = tournaments.get(tournamentType).getConstructor(new Class[]{TournamentOptions.class});
|
||||
tournament = con.newInstance(new Object[] {options});
|
||||
for (String setCode: options.getLimitedOptions().getSetCodes()) {
|
||||
tournament.getSets().add(Sets.findSet(setCode));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
logger.fatal("TournamentFactory error ", ex);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue