craftconomy3 icon indicating copy to clipboard operation
craftconomy3 copied to clipboard

Bug duplicate account.

Open Weark opened this issue 5 years ago • 6 comments

I'll give you an example with random nicknames. Lucas = Minecraft Premium Marcos = Minecraft Cracked

Lucas and Marcos playing on the server, and they are friends and have lots of money, so Marcos said he would stop playing, so Lucas said he would like to use Marcos' nickname, so he goes to Mojang and changes nick from Lucas to Marcos. Now he enters the server and writes a command that has in my server that server to remove the /login and turn into premium, because before the nick Marcos needs login to enter, but now he can skip this step because adiquiriu premium account, so it writes the / premium command and the UUID before it was cracked turned Premium. Now when it enters the server it gives an error because it duplicating the data.

Error console: https://pastebin.com/Ldnu1qi0

Weark avatar Apr 01 '19 04:04 Weark

Hi and thank you for reporting this issue.

The problem here is that craftconomy still uses playernames instead of uuids. The migration from names to uuid is on the roadmap but I need a better testcoverage before I can implement such a breaking change. I will ping you when there is any progress.

pavog avatar Apr 03 '19 19:04 pavog

Now I get it. It would not be possible to make a temporary correction, so when a player that had this problem when entering the server verified if his nick is duplicated in mysql, and drop the nick that is as cracked, so he will not lose the money of the premium account that was in the previous nick before he switched to the nick of the player cracked?

Weark avatar Apr 04 '19 16:04 Weark

I think it is possible to let the second player (with the same name as the first player) overtake the account & balance of the first player. I will have a look into this later this week.

If you want to temporary correct this by hand, you can simply change the database entries manually. Just look for the accounts with the same username and delete the older one (and change the balance of the first).

pavog avatar Apr 08 '19 09:04 pavog

Sorry for the delay to reply. I'm changing the names manually myself, but every time a new players appears with the problem. If you can correct. I'll be creating a report of another bug as well.

Weark avatar May 12 '19 03:05 Weark

Ok, I will try to add uuid support asap and let you know when I make progress on it.

pavog avatar May 13 '19 06:05 pavog

This will help and much my server and I think others too. But to solve this interim you could make a rule type: If a premium player enters the server and it already existed the nick of him like Cracked, make the line of Cracked to be excluded and Kick the player Premium so that it relogue in the server and generate the new line in the correct MySql.

But I think before trying to fix this, it's best to fix the problem with Vault because this is hindering not just me as many people. Please ask so that priority in this case, will be helping many server owners.

Weark avatar May 13 '19 07:05 Weark