mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 12:26:16 -04:00
Fixed wrong username when already logged in. Closes #158
This commit is contained in:
parent
7fe3e28a2d
commit
b8591007cf
@ -49,7 +49,7 @@ public final class YggdrasilAuthenticator extends AbstractAuthenticator {
|
|||||||
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
|
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
|
||||||
UserProfileProvider result = new UserProfileProvider();
|
UserProfileProvider result = new UserProfileProvider();
|
||||||
if (ua.canPlayOnline()) {
|
if (ua.canPlayOnline()) {
|
||||||
result.setUserName(info.username)
|
result.setUserName(ua.getSelectedProfile().name)
|
||||||
.setUserId(UUIDTypeAdapter.fromUUID(ua.getSelectedProfile().id));
|
.setUserId(UUIDTypeAdapter.fromUUID(ua.getSelectedProfile().id));
|
||||||
} else {
|
} else {
|
||||||
String usr = info.username;
|
String usr = info.username;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user