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");