From fa15c203ba45912567af32698f540708c433a01b Mon Sep 17 00:00:00 2001 From: danielb Date: Thu, 23 May 2024 19:29:34 +0000 Subject: [PATCH] fix wrong id given --- .../java/de/butzlabben/WorldSystem/data/WorldSystemData.java | 1 - src/main/java/de/butzlabben/world/config/DependenceConfig.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/de/butzlabben/WorldSystem/data/WorldSystemData.java b/src/main/java/de/butzlabben/WorldSystem/data/WorldSystemData.java index e0f2438..6ee629d 100644 --- a/src/main/java/de/butzlabben/WorldSystem/data/WorldSystemData.java +++ b/src/main/java/de/butzlabben/WorldSystem/data/WorldSystemData.java @@ -126,7 +126,6 @@ public class WorldSystemData extends AbstractSqlLiteDatabase { ResultSet res = this.query(String.format("SELECT * FROM %s WHERE player_uuid = '%s';", WS_WORLDS, uuid)); while (res.next()) { - System.out.println(res); int world_id = res.getInt("world_id"); String player_uuid = res.getString("player_uuid"); String player_name = res.getString("player_name"); diff --git a/src/main/java/de/butzlabben/world/config/DependenceConfig.java b/src/main/java/de/butzlabben/world/config/DependenceConfig.java index 9ca2c6b..4550cc4 100644 --- a/src/main/java/de/butzlabben/world/config/DependenceConfig.java +++ b/src/main/java/de/butzlabben/world/config/DependenceConfig.java @@ -94,7 +94,7 @@ public class DependenceConfig { WorldSystemData db = WorldSystemData.connect(); - int id = db.getHighestID(); + int id = db.getHighestID() + 1; String uuid = this.uuid.toString(); String name = PlayerWrapper.getOfflinePlayer(this.uuid).getName(); long last_loaded = System.currentTimeMillis();