[FIX] MemoryAuthCoreProvider

This commit is contained in:
Gravita 2021-11-09 12:22:18 +07:00
parent c7cb512710
commit 2d0957f834
2 changed files with 2 additions and 2 deletions

View file

@ -198,7 +198,7 @@ public void init(LaunchServer server) {
if(authorizeUrl == null) {
throw new IllegalArgumentException("'authorizeUrl' can't be null");
}
if((checkServerUrl == null && joinServerUrl == null) || updateServerIdUrl == null) {
if(checkServerUrl == null && joinServerUrl == null && updateServerIdUrl == null) {
throw new IllegalArgumentException("Please set 'checkServerUrl' and 'joinServerUrl' or 'updateServerIdUrl'");
}
}

View file

@ -83,7 +83,7 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c
memory.add(user);
}
}
if(minecraftAccess) {
if(!minecraftAccess) {
return AuthManager.AuthReport.ofOAuth(user.accessToken, null, 0, new MemoryUserSession(user));
} else {
return AuthManager.AuthReport.ofOAuthWithMinecraft(user.accessToken, user.accessToken, null, 0, new MemoryUserSession(user));