From ee0a7bc25a605271b392fba887cf95312153f798 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:59:05 +0700 Subject: [PATCH] [FIX] Support mysql/postgresql 1.20.2 --- .../gravit/launchserver/auth/core/AbstractSQLCoreProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index 7306b88b..274c6b85 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -179,7 +179,7 @@ public User checkServer(Client client, String username, String serverID) throws public boolean joinServer(Client client, String username, UUID uuid, String accessToken, String serverID) throws IOException { SQLUser user = (SQLUser) client.getUser(); if (user == null) return false; - return user.getUsername().equals(username) && user.getAccessToken().equals(accessToken) && updateServerID(user, serverID); + return (uuid == null ? user.getUsername().equals(username) : user.getUUID().equals(uuid)) && user.getAccessToken().equals(accessToken) && updateServerID(user, serverID); } @Override