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...
NameWhile
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/loops.html
Syntaxwhile [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>]
Short DescriptionRuns a series of braced commands until the tag returns false.
Full DescriptionRuns a series of braced commands until the if comparisons returns false. Refer to Command:if for if command syntax information.
To end a while loop, use the 'stop' argument.
To jump to the next entry in the loop, use the 'next' argument.
Related Tags<[loop_index]> to get the number of loops so far.
Usage Example
# Use to loop until a player sneaks, or the player goes offline. (Note: generally use 'waituntil' for this instead)
- while !<player.is_sneaking> && <player.is_online>:
    - narrate "Waiting for you to sneak..."
    - wait 1s
Groupqueue
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/queue/WhileCommand.java#L26