update use textComponents, since we rely on paper anyway#14
update use textComponents, since we rely on paper anyway#14FireInstall wants to merge 1 commit intoMinebench:masterfrom
Conversation
9a596a5 to
f1f7f18
Compare
|
|
||
| public void loadConfig() { | ||
| saveDefaultConfig(); | ||
| getConfig().options().copyDefaults(true); // save newly added config options to disk |
There was a problem hiding this comment.
Does this actually do anything on its own? I would assume this needs the config to be saved afterwards. (And you wouldn't want that on loading as that would overwrite existing values) Also with the removed saveDefaultConfig I would assume that it doesn't initially save the config at all.
I don't think it really matters that much that the keys are in the config though. If they are missing they will be pulled in from the file in the jar and if someone with a config which is missing them wants to edit it they can just get the ones they want from the default file in the jar or on github.
There was a problem hiding this comment.
Well yes, it was missing the call to saveConfig(). That was the point where I lacked enough concentration to go to sleep.
However, in my opinion it is pretty inconvenient and confusing, for the config file to miss newly added stuff, when it is really no effort to save defaults.
There was a problem hiding this comment.
This will now cause your local file changes to be overwritten when running /syncinv reload as that calls loadConfig too. The only way to avoid that while still writing the new values into the config would be to first save the default config, then reload the config and then save the defaults into it again. (Or do the defaults saving in startup outside the loadConfig)
There was a problem hiding this comment.
We could just use the config in jar, if we don't overwrite the defaults in getLang() (would be also a problem if we would not save new config keys to disk).
In this case we just have to reload and save.
51fbb14 to
6cb84ae
Compare
6cb84ae to
1c923a9
Compare
Minedown instead of MiniMessage