diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java index 732f8b95..08de95c8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java @@ -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'"); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java index c3c83db6..14d17bb7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java @@ -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));