Multiverse / Multiverse-Inventories

BSD 3-Clause "New" or "Revised" License
93 stars 81 forks source link

Name change profile migration not working correctly #329

Open dumptruckman opened 5 years ago

dumptruckman commented 5 years ago

It seems that when a player changes their name their inventories data is not being properly migrated. In addition to making this work, some improvements would be needed. We need to create a migrated profile directory to store backups of profiles that get migrated. That way in case anything goes wrong we can manually restore data from the backups.

SlimeDog commented 4 years ago

I assume this is due to storing inventories in

worlds/{WORLD}/{PLAYER_NAME}.json

instead of

worlds/{WORLD}/{PLAYER_UUID}.json

even though the mapping exists in

players/{PLAYER_UUID}.json

Migration would be unnecessary if inventory data were stored by UUID and then mapped back to the player name.

Ichikuro commented 4 years ago

Still a bug. Just caught it on my server. Went to find old players files, and are gone due to it knowing to switch to the UUID but the name didnt carry the files over...I'm guessing?

winnipeg21 commented 4 years ago

Sorry to revive old post. I too had/have this issue with players.

SlimeDog commented 4 years ago

I think it's safe to say that everyone does. Note that there is a PR pending.

winnipeg21 commented 4 years ago

True, didn't see the PR on my phone lmao

Thefirstalpha commented 4 years ago

I have the same issue, still no fix?

benwoo1110 commented 4 years ago

There is a test build here if you want to try https://github.com/Multiverse/Multiverse-Inventories/pull/362#issuecomment-648521734

benwoo1110 commented 3 years ago

This PR #428 should have elevated most of the migration issue, do update to the latest test build to try. Appreciate anyone that happens to change their player name to report how it went.

SlimeDog commented 3 years ago

Thanks. I don't have any name changes pending. Hopefully, someone will.

untuned commented 1 year ago

Just had an issue with this, luckily I was able to restore their inventory from a backup, but does anyone have a solution to this?

nicegamer7 commented 1 year ago

@untuned what version of MV Inventories were you using? This should be fixed as of 4.2.3, but if not, I had another unmerged change that could help.

untuned commented 1 year ago

@untuned what version of MV Inventories were you using? This should be fixed as of 4.2.3, but if not, I had another unmerged change that could help.

[21:09:35 INFO]: Multiverse-Inventories version 4.2.4-SNAPSHOT-b524
[21:09:35 INFO]: Author: dumptruckman
seema84 commented 10 months ago

so can we assume that mv inventories still can't deal with name changes?

CloudeLecaw commented 10 months ago

im using the last released version Multiverse-Inventories_4.2.6 i saw players inventories are saved with their name.. and or ith theire uuids?..

its confusing.. me

Here you see its stored by name.. image

and here by uuid...? image

so if i change the name... does it convert this or renmae the files? or does it snyc with the players information stored in uuid?

its confusing me a bit..

what might i can asume what will happen... player changes his name. and logs in world a he has his inventory and all fine.. now he change to world b that has a seperate inventory...

because of the namechange the plugin might not see this other inventory anymore because it was made for the old name?

or does it rename all playername files from all worlds when player logs in? would be a fair deal, even if direct uuid support would be better...

VipelyRS commented 6 months ago

im using the last released version Multiverse-Inventories_4.2.6 i saw players inventories are saved with their name.. and or ith theire uuids?..

its confusing.. me

Here you see its stored by name.. image

and here by uuid...? image

so if i change the name... does it convert this or renmae the files? or does it snyc with the players information stored in uuid?

its confusing me a bit..

what might i can asume what will happen... player changes his name. and logs in world a he has his inventory and all fine.. now he change to world b that has a seperate inventory...

because of the namechange the plugin might not see this other inventory anymore because it was made for the old name?

or does it rename all playername files from all worlds when player logs in? would be a fair deal, even if direct uuid support would be better...

name changing wipes your inventory :/

CloudeLecaw commented 6 months ago

awww thats sad to hear.. people love name changing :-(

RayLumi commented 1 week ago

Is there a solution? I have the latest version and it still has this issue. Multiverse-Core Version: 4.3.12

RayLumi commented 1 week ago

changed to .13. Idk if its fixed though. Multiverse-Core Version: 4.3.13 Multiverse-Inventories Version: 4.2.6