From c68436e1ea59e3ea9675ac07e659725127b30158 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 11 Feb 2020 18:01:52 +0100 Subject: [PATCH] Hotfix SQL --- src/de/steamwar/bungeecore/sql/SQL.java | 2 +- src/de/steamwar/bungeecore/sql/SteamwarUser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/SQL.java b/src/de/steamwar/bungeecore/sql/SQL.java index 6d6434f..5a04413 100644 --- a/src/de/steamwar/bungeecore/sql/SQL.java +++ b/src/de/steamwar/bungeecore/sql/SQL.java @@ -83,7 +83,7 @@ public class SQL { private static PreparedStatement prepare(Connection connection, String qry, Object... objects) throws SQLException{ PreparedStatement st = connection.prepareStatement(qry); for(int i = 0; i < objects.length; i++){ - st.setObject(i+1, objects); + st.setObject(i+1, objects[i]); } return st; } diff --git a/src/de/steamwar/bungeecore/sql/SteamwarUser.java b/src/de/steamwar/bungeecore/sql/SteamwarUser.java index f5c6c97..d88f12b 100644 --- a/src/de/steamwar/bungeecore/sql/SteamwarUser.java +++ b/src/de/steamwar/bungeecore/sql/SteamwarUser.java @@ -75,7 +75,7 @@ public class SteamwarUser { public static SteamwarUser get(UUID uuid){ if(usersByUUID.containsKey(uuid)) return usersByUUID.get(uuid); - return dbInit(SQL.select("SELECT * FROM UserData WHERE UUID = '?'", uuid.toString())); + return dbInit(SQL.select("SELECT * FROM UserData WHERE UUID = ?", uuid.toString())); } public static SteamwarUser get(ProxiedPlayer player){