From ee9e631b29babc6c42e63142114b21b0daafa0ce Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Sun, 15 Jan 2023 22:08:26 +0900 Subject: [PATCH] fix: where clause on temp_rank --- build.gradle.kts | 2 +- .../velocity/AziPluginMessagingVelocity.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d49a502..121717b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "net.azisaba.azipluginmessaging" -version = "4.0.3" +version = "4.0.4" repositories { mavenCentral() diff --git a/velocity/src/main/java/net/azisaba/azipluginmessaging/velocity/AziPluginMessagingVelocity.java b/velocity/src/main/java/net/azisaba/azipluginmessaging/velocity/AziPluginMessagingVelocity.java index 485d69c..a09b273 100644 --- a/velocity/src/main/java/net/azisaba/azipluginmessaging/velocity/AziPluginMessagingVelocity.java +++ b/velocity/src/main/java/net/azisaba/azipluginmessaging/velocity/AziPluginMessagingVelocity.java @@ -115,7 +115,7 @@ public void loadConfig(@NotNull YamlObject obj) { @Override public void checkRankAsync(@NotNull UUID uuid) { - DBConnector.runPreparedStatement("SELECT `rank`, `expires_at`, `clear_prefix_on_expire` FROM `temp_rank` WHERE `player_uuid` = ? AND `expires_at` > 0 AND `expires_at` < CURRENT_TIMESTAMP", ps -> { + DBConnector.runPreparedStatement("SELECT `rank`, `expires_at`, `clear_prefix_on_expire` FROM `temp_rank` WHERE `player_uuid` = ? AND `expires_at` > 0 AND `expires_at` < ?", ps -> { LuckPerms lp = LuckPermsProvider.get(); User user = lp.getUserManager().getUser(uuid); if (user == null) { @@ -128,6 +128,7 @@ public void checkRankAsync(@NotNull UUID uuid) { return; } ps.setString(1, uuid.toString()); + ps.setLong(2, System.currentTimeMillis()); ResultSet rs = ps.executeQuery(); while (rs.next()) { String rank = rs.getString("rank");