mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-12 03:07:59 +00:00
[AB-241] fixing low cooldowns leading to NPE in command cooldown condition
adding more info to command not found exception
This commit is contained in:
@@ -24,9 +24,6 @@ public class CommandCoolDownCondition implements CommandCondition {
|
||||
if(result.getCanExecute()) {
|
||||
return ConditionResult.builder().result(true).build();
|
||||
} else {
|
||||
if(result.getExecuteIn().compareTo(Duration.ofSeconds(1)) < 0) {
|
||||
result.setExecuteIn(Duration.ofSeconds(1));
|
||||
}
|
||||
return ConditionResult.builder().result(false).conditionDetail(new CommandCoolDownDetail(result)).build();
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user