Repository navigation
Definitions: Introduced the enforcement of definition cooldowns - #14
Open
whereareiam wants to merge 3 commits into
Open
whereareiam wants to merge 3 commits into
whereareiam wants to merge 3 commits into
Conversation
8 tasks done
DefinitionParser marks a command with the cooldown of its definition, in seconds and in its group, or in a group of the definition's own when the group is blank. CommandCooldowns registers Cloud's cooldown postprocessor, keeps cooldowns per sender, lets the console through and sends the new cooldown message of ExceptionMessages with the seconds left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
whereareiam
force-pushed
the
feature/cooldowns
branch
from
November 24, 2026 17:39
92b2219 to
5cd8a30
Compare
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DefinitionAdapter.Cooldownwas part of the API, but nothing applied it, so cooldowns from definitions had no effect.DefinitionParsermarks a definition's command with Cloud's cooldown metadata, forgetDuration()seconds. Definitions that name the same group share one cooldown; a blank group gives a definition a cooldown of its own, shared by its aliases. Disabled cooldowns and durations of zero or less are ignored.CommandCooldowns.register(...)inme.whereareiam.commandant.cooldownregisters Cloud's cooldown postprocessor. It keeps cooldowns per sender (Actor#getUniqueId()) in memory, never limits the console (Console.CONSOLE_UUID), and sends the newcooldownmessage with the seconds left ascontent. It has overloads for a staticExceptionMessages, aSupplier<ExceptionMessages>(picks up reloads), andExceptionMessageKeyswith aMessageResolver.clear(UUID)ends a sender's cooldowns early, for example when a player leaves;close()stops the background cleanup of expired cooldowns.ExceptionMessages.cooldownandExceptionMessageKeys.cooldown(commandant.exception.cooldownindefaults()) are new.Identica uses this in whereareiam/Identica (draft PR to follow), built against a Maven-local
1.1.0-local-92b2219of this branch.Release notes
Area: Descriptionwith a listed areaHelp: Fixed ...feature,change,bug,dependencies, orskip-changelogbugonly for a bug that shipped in a release; a fix for a bug that only existed ondevisskip-changelogmajoradded when plugins must change their code on upgrade.github/release-notes.md, if plugins need themChecks
CommandCooldownsTest: refusal and expiry, per sender, shared and blank groups, disabled and empty cooldowns, console, clear)./gradlew testpasses locally.🤖 Generated with Claude Code