mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-21 04:22:22 +00:00
Fix file reference being lost in the config loader
This commit is contained in:
1 parent
350e356eb4
commit
9d7ae1fe89
2 files changed
+4
-2
No files matched your search
@@ -27,6 +27,8 @@ public abstract class AbstractConfig {
|
||||
CommentedConfigurationNode node = configFile.load();
|
||||
|
||||
T val = node.getValue(TypeToken.of(clazz), configFile);
|
||||
val.loader = configFile.loader;
|
||||
val.file = configFile.file;
|
||||
val.insertDefaults();
|
||||
|
||||
configFileList.add(val);
|
||||
|
||||
@@ -36,8 +36,8 @@ public abstract class AbstractConfigFile implements Serializable {
|
||||
|
||||
private static boolean initialized = false;
|
||||
|
||||
private final File file;
|
||||
private final ConfigurationLoader<CommentedConfigurationNode> loader;
|
||||
File file;
|
||||
ConfigurationLoader<CommentedConfigurationNode> loader;
|
||||
// default value is TRUE since most people will forget to set it to true when it needs saving anyway
|
||||
// if you want to use it, set it to false in your constructor or something ;o
|
||||
private boolean needsSaving = true;
|
||||
|
||||
Reference in new issue
Block a user