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 2 out of 161 commands...
NameWait
Syntaxwait (<duration>) (queue:<name>) (system)
Short DescriptionDelays a script for a specified amount of time.
Full DescriptionPauses the script queue for the duration specified. If no duration is specified it defaults to 3 seconds.
Accepts the 'queue:<name>' argument which allows the delay of a different queue.

Accepts a 'system' argument to delay based on system time (real-world time on a clock).
When that argument is not used, waits based on delta time (in-game time tracking, which tends to vary by small amounts, especially when the server is lagging).
Generally, do not use the 'system' argument unless you have a specific good reason you need it.
Related Tags<QueueTag.speed> Returns the speed of the queue as a Duration. A return of '0' implies it is 'instant'.
Usage Example
#Use to delay the current queue for 1 minute.
- wait 1m
Usage Example
#Use to delay the current queue until 1 hour of system time passes.
- wait 1h system
Synonymsdelay
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WaitCommand.java#L22

NameWaitUntil
Syntaxwaituntil (rate:<duration>) (max:<duration>) [<comparisons>]
Short DescriptionDelays a script until the If comparisons return true.
Full DescriptionDelays a script until the If comparisons return true.

Optionally, specify an update rate (if unset, will update at queue speed).
The update rate controls how often the tag will be checked. This generally doesn't need to be set, unless you're concerned about script efficiency.
Never set this to faster than queue update rate.

Optionally specify a maximum duration to wait for.
Related Tags<QueueTag.speed> Returns the speed of the queue as a Duration. A return of '0' implies it is 'instant'.
Usage Example
#Use to delay the current queue until the player respawns (useful in a death event, for example).
- waituntil <player.is_spawned>
Usage Example
#Use to delay the current queue until the player is healed, only checking once per second.
- waituntil rate:1s <player.health> > 15
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WaitUntilCommand.java#L29