SimpleClans

SimpleClans

467k Downloads

"Name" in the database is not updating after changing playername

johnfriedrich opened this issue ยท 4 comments

commented

Simple Clans Build 126
MySQL Database
Spigot 1.8.8

Steps to reproduce:
Join a clan
Change your username at Mojang
log back into the game
You are officially not in a clan but you can't join a new one.
In the database there is still the old Name and because the uuid is unique, a new database entry fo that player cannot be created.

Solution: Check if the playername is still valid for the specific uuid on join and update the database if needed.

Manual solution to fix it: Change the old playername to the new one in the database and reload the plugin

commented

Still an issue. I have seen that this is implented in the code, but It does not work always

commented

I think It'll need to change what thing to pass to DB

commented

Ok got the problem.
The plugin does only update players that are in a clan.
Players that are in the database but not in a clan are not updated on playerJoin
These players are now completely borken unless you change the name in the database manually.

Easy ways to reproduce:

Invite a player into a clan.
Log out player
change name in database to something other than the real name (rtefdsf, what ever)
/clan reload
Join the server

Name in the database is updated.

Invite player into a clan
kick player from clan
log out player
change name in database to something other than the real name (rtefdsf, what ever)
/clan reload
Join the server

Name in the database is NOT updated.

commented

Still an issue?