mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
FIX for CustomCardReader to support instantiation when no custom edition has been found
This commit is contained in:
@@ -28,11 +28,16 @@ public class CardDatabaseHelper {
|
|||||||
private static void initialize() {
|
private static void initialize() {
|
||||||
final CardStorageReader reader = new CardStorageReader(ForgeConstants.CARD_DATA_DIR,
|
final CardStorageReader reader = new CardStorageReader(ForgeConstants.CARD_DATA_DIR,
|
||||||
null, false);
|
null, false);
|
||||||
final CardStorageReader customReader = new CardStorageReader(ForgeConstants.USER_CUSTOM_CARDS_DIR,
|
CardStorageReader customReader;
|
||||||
|
try {
|
||||||
|
customReader = new CardStorageReader(ForgeConstants.USER_CUSTOM_CARDS_DIR,
|
||||||
null, false);
|
null, false);
|
||||||
|
} catch (Exception e) {
|
||||||
|
customReader = null;
|
||||||
|
}
|
||||||
staticData = new StaticData(reader, customReader, ForgeConstants.EDITIONS_DIR,
|
staticData = new StaticData(reader, customReader, ForgeConstants.EDITIONS_DIR,
|
||||||
ForgeConstants.USER_CUSTOM_EDITIONS_DIR ,ForgeConstants.BLOCK_DATA_DIR,
|
ForgeConstants.USER_CUSTOM_EDITIONS_DIR ,ForgeConstants.BLOCK_DATA_DIR,
|
||||||
"Latest",
|
"Latest Art All Editions",
|
||||||
true,
|
true,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user