mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 12:32:23 +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
+1
-1
@@ -2,4 +2,4 @@ mcversion=1.7.10
|
||||
forgeversion=10.13.4.1566-1.7.10
|
||||
version_major=4
|
||||
version_minor=2
|
||||
version_patch=6
|
||||
version_patch=7
|
||||
@@ -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