TheNewEconomy / EconomyCore

The core code powering TNE.
Other
8 stars 5 forks source link

[BUG]: Old data restoration failed when different uuid user has same name #76

Open ibmibmibm opened 8 months ago

ibmibmibm commented 8 months ago

TNE Version

0.1.2.5

Spigot Version

1.20.2

Your config.yml

https://pastebin.ubuntu.com/p/FHpwnby6Z7/

Your latest server log

https://pastebin.ubuntu.com/p/ZFDKcZ6njc/

What modules are you using?

No response

What part of TNE is the bug affecting?

Transactions

Is your server using online mode?

Yes

Bug description

Old data restoration failed when different uuid user has same name

How to reproduce

  1. Install with Mariadb
  2. Run /tne old
creatorfromhell commented 8 months ago

There would be no instance when a UUID user would have the same name unless it's a really old user account, in which it should be removed from extracted.yml before restoring

creatorfromhell commented 8 months ago

Do you have a pastebin of your extracted.yml?

ibmibmibm commented 8 months ago

Original extracted.yml: https://pastebin.ubuntu.com/p/zW3g8VS7Gb/ Manually added missing account data: https://pastebin.ubuntu.com/p/JZV36FNzgy/

creatorfromhell commented 8 months ago

Original extracted.yml: https://pastebin.ubuntu.com/p/zW3g8VS7Gb/ Manually added missing account data: https://pastebin.ubuntu.com/p/JZV36FNzgy/

That didn't clear up too much, what was added to the updated file?

Is it when two player accounts have the same username? Is it when a player and non-player account have the same name? Is it when two non-player accounts have the same name?

ibmibmibm commented 7 months ago

It's two player accounts have the same username(display_name).

creatorfromhell commented 7 months ago

It's two player accounts have the same username(display_name).

Gotcha, I'll probably add a check to remove the duplicate name from the extracted.yml file completely. If the player data for that player is that old then I think it's safe to say they are a "defunct" player.