Player preferences reset after server wipeFixed

Users complain that they have to enable the button each time the server wipes and it isn't enabled by default.

Are you deleting the data/BackpackButton.json file when you wipe the server? That's where the preferences are saved. Don't delete it.

No, I am not deleting that. My file hasn't been edited for 3 days and only has 2 entries in it.

I found a bug with the logic that saves the players' preferences. It's supposed to save the data every 15 minutes if there's been a change to the data, but the bug was that it was using a one-use timer not a repeating timer, so any change to player preferences 15 minutes after the plugin loaded would not be saved until the plugin was unloaded, since unloading the plugin also saves the data if changed. In theory, this shouldn't have been an issue unless the server crashed (since that would prevent the plugin from gracefully unloading), but there's a somewhat common issue where shutting down the server does not always unload plugins successfully, though I'm not sure why that happens.

Locked automatically