Cooldowns: duration, scope and conditions
Define reusable cooldowns in plugins/Obsidrel/resources/cooldowns/. They require a compatible Condition or other invocation.
Real Core-style example
ruby_use:
enabled: true
duration: 5s
scope: PLAYER_ITEM
persistent: false
message: '<warning>Wait {cooldown_remaining}.</warning>
The Core sample also supports a bypass-permission field for an administrator exemption. Another sample uses 750ms and PLAYER scope.
| Field | Meaning |
|---|---|
enabled | On/off |
duration | Time such as 5s, 750ms |
scope | PLAYER or PLAYER_ITEM |
persistent | Optional persistence |
bypass-permission | Optional exemption |
message | Feedback with {cooldown_remaining} |
Connect
ruby_ready:
enabled: true
type: COOLDOWN
cooldown: ruby_use
Save as resources/conditions/ and use conditions: [ruby_ready] in an Action or Trigger. Evaluating COOLDOWN may reserve it: test fast clicks, different items and reconnects.