修复YggdrasilAccount读取到了错误的character

引入:https://github.com/huanghongxun/HMCL/commit/6c4231a6b242c2a11af9768e424593cc6cc14bc5#diff-839dd42e51cd641828b00c5302c02b12R50
This commit is contained in:
yushijinhun committed 2018-06-08 16:31:56 +08:00
1 parent 6fb548e6c3
commit 6ee99b5736
2 files changed
+2 -2

No files matched your search

@@ -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."));
@@ -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));