⌘K

Expressions & Operators

Updated 16 Mar 2026

Arithmetic

set $a = 10
set $b = 3
set $sum      = $a + $b    # 13
set $diff     = $a - $b    # 7
set $product  = $a * $b    # 30
set $quotient = $a / $b    # 3.333...
set $mod      = $a % $b    # 1

Parentheses work as expected: set $x = ($a + $b) * 2

Comparison operators

OperatorMeaning
==Equal
!=Not equal
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal

Logical operators

if $health < 5 and $shield == 0:
    send "&cYou are in danger!" to player

if $rank == "vip" or $rank == "admin":
    give player diamond 1

if not $alive:
    send "&7You are a ghost." to player

String interpolation

Embed variables anywhere in a quoted string:

send "&aYour score is $score points!" to player
send "Welcome back, $name. You have $coins coins." to player

Colour codes use the & prefix (standard Minecraft formatting).