Fix update username in FastLogin database after nameChange (Fixes #67)
This commit is contained in:
1 parent
ebe768f7a2
commit
58ac73a5a9
5 files changed
+19
-2
No files matched your search
+4
@@ -78,6 +78,10 @@ public class NameCheckTask implements Runnable {
|
||||
PlayerProfile uuidProfile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
||||
if (uuidProfile != null) {
|
||||
plugin.getLogger().log(Level.FINER, "Player {0} changed it's username", premiumUUID);
|
||||
|
||||
//update the username to the new one in the database
|
||||
uuidProfile.setPlayerName(username);
|
||||
|
||||
enablePremiumLogin(uuidProfile, false);
|
||||
return;
|
||||
}
|
||||
|
||||
+4
@@ -70,6 +70,10 @@ public class ProtocolSupportListener implements Listener {
|
||||
PlayerProfile uuidProfile = plugin.getCore().getStorage().loadProfile(premiumUUID);
|
||||
if (uuidProfile != null) {
|
||||
plugin.getLogger().log(Level.FINER, "Player {0} changed it's username", premiumUUID);
|
||||
|
||||
//update the username to the new one in the database
|
||||
uuidProfile.setPlayerName(username);
|
||||
|
||||
startPremiumSession(username, loginStartEvent, false, uuidProfile);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user