Variable scopes
| Declaration | Scope |
set $x = value | Local to the current execution |
set global $x = value | Shared across all scripts (session) |
store key value / load $x from key | Persists across restarts |
All control structures
if <cond>: else if <cond>: else:
while <cond>:
for $i from <n> to <n> [step <n>]:
for [each] $x in <expr>:
repeat <n> times:
repeat until <cond>:
switch <expr>: case <val>: default:
try: catch $err: finally:
define <name>([params]):
return [expr]
break
continue
command /name:
import <scriptname>
emit <eventname>
log [level] <message>
Command argument variables
| Variable | Description |
$args | Full raw argument string |
$arg1 … $argN | Individual arguments split by spaces |
$argc | Number of arguments |
console vs execute
| Action | Runs as | Permission check |
console <cmd> | Server console | None — bypasses all permissions |
execute <cmd> | The player | Full permission check applies |
Colour codes
| Code | Colour |
&0 – &9 | Black → Dark Aqua |
&a – &f | Green → White |
&l | Bold |
&o | Italic |
&n | Underline |
&m | Strikethrough |
&r | Reset |