Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XUID rather than Username #5287

Open
dotV3 opened this issue Sep 15, 2022 · 5 comments
Open

XUID rather than Username #5287

dotV3 opened this issue Sep 15, 2022 · 5 comments
Labels
Category: Core Related to internal functionality Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dotV3
Copy link

dotV3 commented Sep 15, 2022

Change the player data to be set using the XUID rather than the username

It's how it should be set in the first place because if a player changes their Microsoft username then they'll lose all their data (loot/xp/etc) while if it's set to XUID then they'll keep their data and stuff even if they change their Microsoft username.

@xerenahmed
Copy link
Contributor

if this is going to happen, it should be with the setting chosen by the user.

For example, in pocketmine.yml

player:
  save-strategy: "username" | "xuid" | "both"

if you select both, it will use XUID if it exists, if it's not use the username. (Always will save the data to both on player quit.). This old data (with usernames) will be protected and XUID will work in future.

@dktapps
Copy link
Member

dktapps commented Sep 15, 2022

This is non-trivial to implement under the current playerdata storage system, since it would require data migration for existing servers.

Relates to #4077.

@dktapps dktapps added Category: Core Related to internal functionality Type: Change Proposal labels Sep 15, 2022
@dotV3
Copy link
Author

dotV3 commented Sep 15, 2022

Can't data migration be done through a plugin easily?

@dktapps
Copy link
Member

dktapps commented Sep 15, 2022

A core data change needs to be accommodated by the core itself. There are 10 years' worth of PocketMine-MP servers which use the current system.

@dotV3
Copy link
Author

dotV3 commented Sep 15, 2022

as said in #5287 (comment) , Default can be set to "username" so the XUID is optional but possible so that it prevents data loss. Data migration would still be required in case of switching to XUID rather than USERNAME but they wouldn't be forced to use it and as I said it'd be optional to switch to using XUID.

@dktapps dktapps added the Type: Enhancement Contributes features or other improvements to PocketMine-MP label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

No branches or pull requests

3 participants