From eddadcc179c548bd0f34c68bb8c0a8df9b2bff23 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Thu, 1 Jan 2015 23:56:17 -0500 Subject: [PATCH] Properly allow searches by name without UUID --- .../java/com/gmail/nossr50/database/SQLDatabaseManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index 30a38e765..b935d872b 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -1587,7 +1587,7 @@ public final class SQLDatabaseManager implements DatabaseManager { try { statement = connection.prepareStatement("SELECT id, user FROM " + tablePrefix + "users WHERE uuid = ? OR (uuid IS NULL AND user = ?)"); - statement.setString(1, uuid.toString()); + statement.setString(1, uuid == null ? null : uuid.toString()); statement.setString(2, playerName); resultSet = statement.executeQuery();