Inventories not saved as often as the minecraft world
An issue exists where if minecraft crashes for some reason, the last point inventories were saved is usually much older than the last point the world itself was saved, causing a partial inventory reset which can either duplicate items or remove them from the game world.
Steps to reproduce:
- Do stuff on the server for a while (30 mins to 1 hour), including placing/mining blocks and crafting.
- Crash the server. kill -9 works well for this for testing purposes, although misbehaving plugins are more often the cause in normal servers.
- Log back in after restarting, note that your inventory and position is usually much older than the current state of the world.
Expected behavior: Inventories are saved every time the minecraft world saves, to keep the world state and player inventory state consistent in the event of a server crash or other issue.
The only way this would occur is if you're using save_load_on_log_in_out: true in the plugin config where there is a warning that states The biggest potential drawback here is that if your server crashes, player stats/inventories may be lost/rolled back!.
I guess I could consider adding some kind of regular save for this...
I have a similar problem. First I tried it with "save_load_on_log_in_out: false" but everytime a player logs out in the survival world and logs in again, the survival inventory was reset to an old state and some of the items from the survival inventory are now in the creative inventory. Then I tried to fix it with changing "save_load_on_log_in_out: true" so the server handles the inventorys, but it is the same problem. If I logout in the survival world and login again I get an old inventory, not the one I had as I logged out. If I move first to the creative world and logout then I get the latest inventory after logging in to the creative world and then using the portal to the survival world.