Skip to content

Commit

Permalink
fix: where clause on temp_rank
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jan 15, 2023
1 parent a7b0f4f commit ee9e631
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = "net.azisaba.azipluginmessaging"
version = "4.0.3"
version = "4.0.4"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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");
Expand Down

0 comments on commit ee9e631

Please sign in to comment.