forked from External/mage
Added builder method to cards
This commit is contained in:
parent
533cc69101
commit
4de0bdec64
2 changed files with 12 additions and 9 deletions
|
|
@ -298,7 +298,9 @@ public class Sets extends HashMap<String, ExpansionSet> {
|
|||
public static Card createCard(Class clazz) {
|
||||
try {
|
||||
Constructor<?> con = clazz.getConstructor(new Class[]{UUID.class});
|
||||
return (Card) con.newInstance(new Object[] {null});
|
||||
Card card = (Card) con.newInstance(new Object[] {null});
|
||||
card.build();
|
||||
return card;
|
||||
} catch (Exception ex) {
|
||||
logger.fatal("Error creating card:" + clazz.getName(), ex);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue