Compatibility
Minecraft: Java Edition
1.21–1.21.4
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Licensed ARR
Published 5 months ago
Updated 5 months ago
Load Player By Name
Minecraft stores the player data by their UUIDs, but the UUIDs in online mode servers (provided by Mojang's official API) are different with the one generated offline.
This cause issues when you want to change online/offline mode while not affecting your players' data
How This Plugin Works
I guess you don't care about this
- It stores an name to UUID association table
- When a player joins:
- We receive an UUID of the player (new ID)
- Look the player name in the table and get the old ID
- If not present, try getting the Mojang official UUID as old ID
- If even the official ID isn't present
- It's a new offline player, ignore
- Try to move the player data from old ID to new ID
- If succeeded, it will kick the player once, and prompt them to rejoin immediately
- When a player quits:
- Update the association table
Cases
-
Server was online mode, plugin not installed
You can switch to offline mode with this plugin installed now
-
Plugin installed
You can switch between modes with ease, without player data lossing
Notes
- I don't know what will happen if you switch between modes and a player change their username at the same time
- I sometimes spell the plugin
LoadByPlayerName
, well, doesn't matter I guess