Config reset on server shutdown/restart
benwoo1110 opened this issue ยท 4 comments
Description
The issue is due to config being saved on server shutdown. This is done to prevent any unsaved changes by server to be discarded but it creates a side effect that config file change may be reset upon server shutdown/restart. We could just ask people to do /mvreload
but opening this issue to see if there is a better solution.
Steps to reproduce
- Edited config.yml/worlds.yml
- stop the server
- Changes will be reverted.
I see this is an old issue but still open. I'm having this problem but with an additional twist.
Purpur 2215 1.20.6, multiverse-core 4.3.12
When I make any change to worlds.yml, the changes are reverted to the auto-generated file. This file contains all my worlds but with information I desparately need to change. I have a MiniGames server with 42 worlds currently (and probably a few more yet to be added), so doing all this from in-game chat will be quite tedious.
This issue persists despite my attempts:
- copy file to local folder, make changes, copy back to server, and /mv reload
- stop server, repeat steps above, and start server
I'm not sure what else to try at this point; if multiverse is somehow pushing the saved file on every restart (from where?), I need to stop that happening.
Edit: also ran the local file through a YAML parser just in case it was reverting because it found an error; test passed, and I've looked very carefully at the file multiple times to confirm it's valid
Edit2: Just checked with in-game commands, the flag keepSpawnInMemory isn't working at all. I can use the in-game commands to set the spawnpoint, difficulty, and world generator, but I have no way of affecting the memory usage. I can force "autoLoad" to false, but that is not at all what I'm wanting to accomplish.
Edit3: I finally got some settings to save, by removing the plugin entirely from the server, loading a different world management plugin, rebooting one time, and then shutting the server down. At that point I can edit the worlds.yml and some of the values will save. Coordinates of spawn point and world generator will save, but others like keepspawninmemory will not. If I edit the order of the worlds in the file (by bulk cutting and pasting) those will be reset as well. If I do not follow all of those steps, the entire content of the file will be reset. If I try to edit with in-game commands, nothing is changed.
By right after every change it will save back to the config files, but just in case, it's safer to do it to ensure unsaved changes by the mv is all saved back to the file.
I would say this issue is quite minor as you can do the following workarounds:
- Run
/mv reload
after a config change. - Stop the server before changing/editing the config files.
I mainly opened this issue just so people are aware of such behaviour and how to work around it for now.