[FIX] Support mysql/postgresql 1.20.2

This commit is contained in:
Gravita 2023-12-01 17:59:05 +07:00
parent ebbd1c87e8
commit ee0a7bc25a

View file

@ -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 { public boolean joinServer(Client client, String username, UUID uuid, String accessToken, String serverID) throws IOException {
SQLUser user = (SQLUser) client.getUser(); SQLUser user = (SQLUser) client.getUser();
if (user == null) return false; 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 @Override