mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Fix #1053 NPE when loading with old configs
This commit is contained in:
1 parent
6265c01f60
commit
bbd39ea5c7
2 files changed
+3
-2
No files matched your search
@@ -17,6 +17,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -213,7 +214,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
}
|
||||
|
||||
LocalizedConfiguration config = new LocalizedConfiguration(configFile, "2.0.0");
|
||||
if (!config.getLoadedConfigVersion().equals(config.getDefinedConfigVersion())) {
|
||||
if (!Objects.equals(config.getLoadedConfigVersion(), config.getDefinedConfigVersion())) {
|
||||
boolean deleted = configFile.delete();
|
||||
if (deleted) {
|
||||
config = new LocalizedConfiguration(configFile, "2.0.0");
|
||||
|
||||
Reference in new issue
Block a user