- message for connected players using old nicknames
Simple Fabric+Polymer-based mod that adds a command for server operators to handle player renaming with saving all player's progress on a new nickname.
Due to Minecraft server offline mode mechanism, every single time when nickname is changed, new UUID is computed based off it.
This mod adds an ability to preserve player data whenever someone requests to change their nickname.
Since everything in the server logic is based on UUID, this mod preserves an original UUID and changes nickname for it.
Whenever server is started in offline mode, new file is created under the server's root path, called player-nickname-migrations/migrations.json. So if you want to make amends when server is turned off, just add migrations in this manner:
{
"praise_the_sun": "praise_the_moon"
}And start the server. Once it has started, the data is parsed once, and then is never read unless new restart comes up
/transferplayer old_nickname new_nickname
After every successful command execution (and server shutdown), player-nickname-migrations/migrations.json will be updated.
By default, level 4 operator is required, but thanks to Fabric Permissions API you can set player-migration.command.transferplayer permission.