Fixed wrong username when already logged in. Closes #158

This commit is contained in:
huangyuhui 2017-07-03 08:52:41 +08:00
parent 7fe3e28a2d
commit b8591007cf

View File

@ -49,7 +49,7 @@ public final class YggdrasilAuthenticator extends AbstractAuthenticator {
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
UserProfileProvider result = new UserProfileProvider();
if (ua.canPlayOnline()) {
result.setUserName(info.username)
result.setUserName(ua.getSelectedProfile().name)
.setUserId(UUIDTypeAdapter.fromUUID(ua.getSelectedProfile().id));
} else {
String usr = info.username;