Skip to content

Commit

Permalink
Update AbstractFormattedFileCardExport.java
Browse files Browse the repository at this point in the history
  • Loading branch information
nicho92 authored Jan 3, 2024
1 parent f299eae commit 09a0ae2
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@ protected String[] splitLines(String content,boolean removeBlank)
protected MagicCard parseMatcherWithGroup(Matcher m,int gCard,int gEdition,boolean cleaning,FORMAT_SEARCH setSearch, FORMAT_SEARCH cardSearch)
{
MagicEdition ed = null;
try {
if(setSearch==FORMAT_SEARCH.ID)
ed = getEnabledPlugin(MTGCardsProvider.class).getSetById(aliases.getSetIdFor(this,m.group(gEdition)));
else
ed = getEnabledPlugin(MTGCardsProvider.class).getSetByName(aliases.getSetNameFor(this,m.group(gEdition)));

} catch (Exception e) {
ed = null;
if(gEdition > -1)
{

try {
if(setSearch==FORMAT_SEARCH.ID)
ed = getEnabledPlugin(MTGCardsProvider.class).getSetById(aliases.getSetIdFor(this,m.group(gEdition)));
else
ed = getEnabledPlugin(MTGCardsProvider.class).getSetByName(aliases.getSetNameFor(this,m.group(gEdition)));

} catch (Exception e) {
ed = null;
}
}

String cname = m.group(gCard);

if(cleaning)
Expand Down

0 comments on commit 09a0ae2

Please sign in to comment.