Skip to content

Commit

Permalink
Fix incomplete cooldowns being added to data (#4249)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored Jun 18, 2021
1 parent 1da3b3f commit 003d556
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ public void addCommandCooldown(final Pattern pattern, final Date expiresAt, fina
final CommandCooldown cooldown = new CommandCooldown();
cooldown.pattern(pattern);
cooldown.value(expiresAt.getTime());
if (cooldown.isIncomplete()) {
return;
}
holder.timestamps().commandCooldowns().add(cooldown);
if (save) {
save();
Expand Down

0 comments on commit 003d556

Please # to comment.