SyntaxΒΆ

A table of the syntax for different operations.

Syntax

Operation

:var varName .= <int>

Define a new variable

:obj objectiveName <objective>

Define a new scoreboard objective

:sobj objectiveName <objective> <target> <assignment operator> <int>

Set the value of an objective for a given target (eg. @a or PlayerName)

:var varName <assignment operator> <int>

Update the value of an existing variable

:tvar varName

Used to test variables in if commands (eg. execute if :tvar varName matches 1)

:func name

Define a function. Generates a new mcfunction file

:endfunc

Close a function definition.

:call <function>

Call a function. Can infer namespace based on directory (see function calling example)

Assignment Operators

+=

Add to a variable.

-=

Subtract from a variable.

=

Set the value of a variable.