diff --git a/src/de/steamwar/bungeecore/sql/SQL.java b/src/de/steamwar/bungeecore/sql/SQL.java index 6d6434ff..5a04413e 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 f5c6c977..d88f12bf 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){