OnlineTOOffline Restore PlayerData-UUID
This server-side mod for Minecraft solves the problem of preserving player data when switching a server from online mode to offline mode. It automatically renames existing player information files, converting old online UUIDs to new offline UUIDs, allowing all items, statistics, and progress of each participant to be preserved.
Important Warning
BEFORE USING THE MOD, BE SURE TO CREATE A BACKUP OF THE world/playerdata FOLDER! This mod directly renames .dat files and cannot automatically undo the changes made.
How It Works
The mod reads the correspondence between player names and their original online UUIDs from a configuration file. When a player joins the server:
- If their name is present in the list and a corresponding old
.datfile exists: - A backup of the current (offline) data file is created
- The player receives a temporary disconnection from the server
- The server renames the original
.datfile (with online UUID) to the new offline UUID - Upon re-entering, the player retains all previous statistics, inventory, and progress
- If no correspondence or file is found, the player joins the server without any changes
Setup Using Python Script
Due to unstable operation of the Java-based MappingFileManager.java API, it is recommended to use a Python script for setup.
1. Download the Script
Use the included lookup_players.py file.
2. Prepare a Folder
Create a new folder and place in it:
lookup_players.py- All
UUID.datfiles from theworld/playerdatafolder of your online server
3. Run the Script
Open a terminal or command line in this folder and execute:
python lookup_players.py
This will create a file:
player_uuid_mapping.json
4. Copy the Mapping File
Move player_uuid_mapping.json to your server's configuration directory:
/config/
When Starting the Server
- The mod will read the mapping file and check for player name matches
- If a corresponding old
.datfile is found: - The player receives a brief message and is disconnected
- The data file is renamed to the new offline UUID
- Upon reconnecting, the player continues with the original data
- If no corresponding
.datfile is found, no action is taken, and the player joins normally