[FIX] ClassCastException

This commit is contained in:
Gravita 2022-12-09 20:19:22 +07:00
parent cc825df41e
commit 7f4fe566de
2 changed files with 3 additions and 2 deletions

View file

@ -238,7 +238,7 @@ public void close() throws IOException {
getSQLConfig().close();
}
private SQLUser constructUser(ResultSet set) throws SQLException {
protected SQLUser constructUser(ResultSet set) throws SQLException {
return set.next() ? new SQLUser(UUID.fromString(set.getString(uuidColumn)), set.getString(usernameColumn),
set.getString(accessTokenColumn), set.getString(serverIDColumn), set.getString(passwordColumn), requestPermissions(set.getString(uuidColumn))) : null;
}

View file

@ -63,7 +63,8 @@ public void init(LaunchServer server) {
sqlUpdateUsers = String.format("UPDATE %s SET `%s` = ? WHERE `%s` = ?", table, hardwareIdColumn, uuidColumn);
}
private MySQLUser constructUser(ResultSet set) throws SQLException {
@Override
protected MySQLUser constructUser(ResultSet set) throws SQLException {
return set.next() ? new MySQLUser(UUID.fromString(set.getString(uuidColumn)), set.getString(usernameColumn),
set.getString(accessTokenColumn), set.getString(serverIDColumn), set.getString(passwordColumn), requestPermissions(set.getString(uuidColumn)), set.getLong(hardwareIdColumn)) : null;
}