From d5475700b438f6da9676d7da5809b2db7756ba72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Lei=C3=9F?= Date: Sat, 27 Feb 2016 01:26:28 +0100 Subject: [PATCH] Add uuid to banhistory request. --- src/main/java/net/cubespace/geSuit/database/Bans.java | 4 ++-- src/main/java/net/cubespace/geSuit/managers/BansManager.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/cubespace/geSuit/database/Bans.java b/src/main/java/net/cubespace/geSuit/database/Bans.java index 43732454..30963f01 100644 --- a/src/main/java/net/cubespace/geSuit/database/Bans.java +++ b/src/main/java/net/cubespace/geSuit/database/Bans.java @@ -136,14 +136,14 @@ public void tempBanPlayer(String banned_playername, String banned_uuid, String b } } - public List getBanHistory(String lookup) { + public List getBanHistory(String lookup, String uuid) { List bans = new ArrayList<>(); ConnectionHandler connectionHandler = DatabaseManager.connectionPool.getConnection(); try { PreparedStatement banInfo = connectionHandler.getPreparedStatement("banHistory"); banInfo.setString(1, lookup); - banInfo.setString(2, lookup); + banInfo.setString(2, uuid); banInfo.setString(3, lookup); ResultSet res = banInfo.executeQuery(); diff --git a/src/main/java/net/cubespace/geSuit/managers/BansManager.java b/src/main/java/net/cubespace/geSuit/managers/BansManager.java index 01f3a207..e4dbba46 100644 --- a/src/main/java/net/cubespace/geSuit/managers/BansManager.java +++ b/src/main/java/net/cubespace/geSuit/managers/BansManager.java @@ -194,7 +194,7 @@ public static void displayPlayerBanHistory(String sentBy, String player) { CommandSender sender = (s == null ? ProxyServer.getInstance().getConsole() : s.getProxiedPlayer()); BanTarget t = getBanTarget(player); - List bans = DatabaseManager.bans.getBanHistory(t.name); + List bans = DatabaseManager.bans.getBanHistory(t.name, t.uuid); if (bans == null || bans.isEmpty()) { PlayerManager.sendMessageToTarget(sender, Utilities.colorize(ConfigManager.messages.PLAYER_NEVER_BANNED.replace("{player}", t.dispname)));