fixed syntax errors

This commit is contained in:
danielb 2024-05-23 19:36:36 +00:00
parent fa15c203ba
commit e227741395

View File

@ -88,7 +88,7 @@ public class WorldSystemData extends AbstractSqlLiteDatabase {
public void update_name(String uuid, String new_name) {
try {
this.void_query(String.format("UPDATE %s SET player_name = %s WHERE player_uuid = %s;", WS_WORLDS, new_name, uuid));
this.void_query(String.format("UPDATE %s SET player_name = %s WHERE player_uuid = '%s;'", WS_WORLDS, new_name, uuid));
} catch (SQLException e) {
WorldSystem.logger().log(Level.SEVERE, "Tried to update player name but failed skipping");
WorldSystem.logger().log(Level.SEVERE, e.getMessage());
@ -144,7 +144,7 @@ public class WorldSystemData extends AbstractSqlLiteDatabase {
public void update_last_loaded(String uuid, long new_time) {
try {
this.void_query(String.format("UPDATE %s SET last_loaded = %s WHERE player_uuid = %s;", WS_WORLDS, new_time, uuid));
this.void_query(String.format("UPDATE %s SET last_loaded = %d WHERE player_uuid = '%s';", WS_WORLDS, new_time, uuid));
} catch (SQLException e) {
WorldSystem.logger().log(Level.SEVERE, "[WorldSystem] Tried to update player name but failed skipping");
}