Paper
Paper copied to clipboard
Only create paper.yml-README.txt when config conversion happens
Currently, Paper always creates paper.yml-README.txt
if there is no such file in main directory.
With this PR, Paper will only generate paper.yml-README.txt
file config file conversion happens.
If there are any other situation I should check too, let me know.
This PR may resolve #8332 (forgot to mention, thanks for remind me!)
But the method I used is very ugly. Since GlobalConfiguration.get().misc was null, I had to use this way. If there is any better way to get the value, please tell me.
Yeah I'm not sure there is really. Unless you moved the whole readme file creation logic until after the global configuration was initialized. I guess you could technically do that, move it to PaperConfigurations#initializeGlobalConfig, but your way is probably cleaner than that.
Wouldn't it be simpler to only create the file if the newer config files don't exist already?
Updated PR to reflect suggestion. I think server admin should manually check config about README file generation, but this new method is cleaner way to check things. No manual value check with plain string key.
imho, it literally just needs to create the file when creating a new config folder, nothing more, nothing less; There is literally 0 reasons to have a config for this for any reason, the literal sole intent is to just say "we moved this"
I don't think it's only relevant to those upgrading from new configs, as we see the odd person who installed a new server and is still referring to old documentation from around the web, etc