Common statements and placeholders
Learn the structure of common statements and what to put in their placeholders
This chapter follows the actual structure of each statement. Braced names such as {placeholder} mark values you need to supply.
{action} means an action: an expression that produces a value.
Square brackets, [ ], mark optional parts.
inline — resolve expressions in a string
Syntax:
inline {string}Examples:
inline "{{ sender }}"
inline "give {{ sender }} {{ amount }} diamond"tell / send / message — send a message
Syntax:
tell {text} | send {text} | message {text}Examples:
tell "Hello"
tell inline "{{ sender }} completed the quest"
send "A fixed message"title — display a title
Syntax:
title {action} [subtitle {action}] [by {int} {int} {int}]Examples:
title "Quest complete"
title "Main title" subtitle "Subtitle"
title "Congratulations" subtitle "You leveled up" by 10 40 10command — run a command
Syntax:
command {action} [by player|op|console]Examples:
command inline "give {{ sender }} diamond 1"
command "spawn" by consolecheck — compare values
Syntax:
check {left} {operator} {right}Examples:
check money >= 100
check &level == 5
check name contains "Admin"if — conditional branches
Syntax:
if {condition} then {action} [else {action}]Examples:
if check money >= 100 then {
tell "You have enough money"
} else {
tell "Not enough money"
}
if perm "myplugin.vip" then { give diamond 1 }perm / permission — check permissions
Syntax:
perm[ission] {action}Examples:
perm "myplugin.vip"
permission "essentials.home"player location — work with player locations
Syntax:
player location
player location to {location}player location: return the player's current location without teleporting them.player location to {location}: teleport the player to the supplied{location}.
Examples:
player location
player location to loc world 0 100 0
player location to loc world 64 70 -128loc / location — create a location
Syntax:
loc[ation] {action} {action} {action} {action} [and {action} {action}]Examples:
loc world 0 100 0
loc world 64 70 -128 and 90 0
location world 0 100 0Summary: placeholder conventions
| Placeholder | Meaning |
|---|---|
{text} | Text |
{action} | Any action that produces a value |
{condition} | An action that returns true or false |
[ ] | An optional part |