Use this script to convert a minecraft server from online mode to offline mode, or vice versa. Works for self-hosted servers on Linux.
Usage:
- stop your server
- install python and dependencies
- navigate to the root folder of your server
- run the script
python convert-server.py
- edit your server.properties online-mode setting
- start your server
And now all of your player data (inventory, stats, advancements) should persist after your server has changed mode.
By default it does an online to offline conversion. Pass a command line argument for offline to online.