mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed crash when loading an invalid config
This commit is contained in:
parent
eace54f36a
commit
c6d5b75896
1 changed files with 5 additions and 1 deletions
|
@ -48,7 +48,11 @@ public class Unicopia implements ModInitializer {
|
||||||
public static Config getConfig() {
|
public static Config getConfig() {
|
||||||
if (CONFIG == null) {
|
if (CONFIG == null) {
|
||||||
CONFIG = new Config();
|
CONFIG = new Config();
|
||||||
CONFIG.load();
|
try {
|
||||||
|
CONFIG.load();
|
||||||
|
} catch (IllegalStateException ignored) {
|
||||||
|
CONFIG.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return CONFIG;
|
return CONFIG;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue