Fix config files not retaining comments
This commit is contained in:
@@ -40,7 +40,7 @@ shadowJar {
|
||||
include(dependency("me.hypherionmc.moon-config:core:${moon_config}"))
|
||||
include(dependency("me.hypherionmc.moon-config:toml:${moon_config}"))
|
||||
|
||||
//relocate 'me.hypherionmc.nightconfig', 'shadow.hypherionmc.nightconfig'
|
||||
relocate 'me.hypherionmc.moonconfig', 'shadow.hypherionmc.moonconfig'
|
||||
}
|
||||
classifier ''
|
||||
}
|
||||
|
@@ -108,8 +108,11 @@ public class ModuleConfig {
|
||||
|
||||
/* Upgrade the config */
|
||||
new ObjectConverter().toConfig(conf, newConfig);
|
||||
updateConfigValues(config, newConfig, CommentedConfig.copy(newConfig), "");
|
||||
updateConfigValues(config, newConfig, newConfig, "");
|
||||
newConfig.save();
|
||||
|
||||
config.close();
|
||||
newConfig.close();
|
||||
}
|
||||
|
||||
private void updateConfigValues(CommentedConfig oldConfig, CommentedConfig newConfig, CommentedConfig outputConfig, String subKey) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Project
|
||||
version_major=0
|
||||
version_minor=0
|
||||
version_patch=6d
|
||||
version_patch=8d
|
||||
group=me.hypherionmc.craterlib
|
||||
|
||||
# Common
|
||||
|
Reference in New Issue
Block a user