Merge pull request #344 from yushijinhun/javafx

修复YggdrasilAccount读取到了错误的character
This commit is contained in:
huanghongxun 2018-06-08 16:36:50 +08:00 committed by GitHub
commit e3f371f457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class AuthlibInjectorAccountFactory extends AccountFactory<AuthlibInjecto
String username = tryCast(storage.get("username"), String.class)
.orElseThrow(() -> new IllegalArgumentException("storage does not have username"));
String character = tryCast(storage.get("clientToken"), String.class)
String character = tryCast(storage.get("character"), String.class)
.orElseThrow(() -> new IllegalArgumentException("storage does not have selected character name."));
String apiRoot = tryCast(storage.get("serverBaseURL"), String.class)
.orElseThrow(() -> new IllegalArgumentException("storage does not have API root."));

View File

@ -60,7 +60,7 @@ public class YggdrasilAccountFactory extends AccountFactory<YggdrasilAccount> {
String username = tryCast(storage.get("username"), String.class)
.orElseThrow(() -> new IllegalArgumentException("storage does not have username"));
String character = tryCast(storage.get("clientToken"), String.class)
String character = tryCast(storage.get("character"), String.class)
.orElseThrow(() -> new IllegalArgumentException("storage does not have selected character name."));
return new YggdrasilAccount(new YggdrasilService(provider, proxy), username, character, YggdrasilSession.fromStorage(storage));