Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameRateLimit
Syntaxratelimit [<object>] [<duration>]
Short DescriptionLimits the rate that queues may process a script at.
Full DescriptionLimits the rate that queues may process a script at.
If another queue tries to run the same script faster than the duration, that second queue will be stopped.

Note that the rate limiting is tracked based on two unique factors: the object input, and the specific script line.
That is to say: if you have a 'ratelimit <player> 10s', and then a few lines down a 'ratelimit <player> 10s',
those are two separate rate limiters.
Additionally, if you have a 'ratelimit <player> 10s' and two different players run it, they each have a separate rate limit applied.

Note that this uses game delta tick time, not system realtime.
Related TagsNone
Usage Example
# Use to show a message to a player no faster than once every ten seconds.
- ratelimit <player> 10s
- narrate "Wow!"
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/RateLimitCommand.java#L24