aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-25 11:44:03 +0200
committermakamys <makamys@outlook.com>2022-06-25 11:44:03 +0200
commitda6a56e44b6b9807e8939953e18974d090be2888 (patch)
tree2fb115262f3db3f973b56cfd74428deaf27fefd6 /src/main/java/makamys/neodymium
parent9f04b25593607bc051b03168b9f25933aa0a29b4 (diff)
downloadNeodymium-da6a56e44b6b9807e8939953e18974d090be2888.tar.gz
Neodymium-da6a56e44b6b9807e8939953e18974d090be2888.tar.bz2
Neodymium-da6a56e44b6b9807e8939953e18974d090be2888.zip
Rewrite config if mod version has changed
Diffstat (limited to 'src/main/java/makamys/neodymium')
-rw-r--r--src/main/java/makamys/neodymium/Config.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/Config.java b/src/main/java/makamys/neodymium/Config.java
index 6c11def..93e97f2 100644
--- a/src/main/java/makamys/neodymium/Config.java
+++ b/src/main/java/makamys/neodymium/Config.java
@@ -77,7 +77,7 @@ public class Config {
e.printStackTrace();
}
- Configuration config = new Configuration(configFile);
+ Configuration config = new Configuration(configFile, Neodymium.VERSION);
config.load();
@@ -86,7 +86,7 @@ public class Config {
info.needReload = needReload;
}
- if(config.hasChanged()) {
+ if(config.hasChanged() || (!config.getLoadedConfigVersion().equals(config.getDefinedConfigVersion()))) {
config.save();
}