Statements

Single-line actions that execute within a block.

173 patterns

Attribute

set %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% [base] [value] [to] %val:EXPR%
Attribute
1.0.0

Sets the base value of an attribute on a living entity.

Examples
set mob's max_health to 40
reset %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE%
Attribute
1.0.0

Resets an entity's attribute base value to its default value.

Examples
reset mob's max_health
add %val:EXPR% [to] %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE%
Attribute
1.0.0

Adds a value to an entity's attribute base value.

Examples
add 10 to mob's max_health

Block

set %b:BLOCK% type [to] %mat:MATERIAL%
Block
1.0.0

Sets the type (material) of a block.

Examples
set block type to stone
break %b:BLOCK% naturally
Block
1.0.0

Breaks a block naturally, dropping its items as if mined by a player.

Examples
break block naturally
set %b:BLOCK% data [to] %data:EXPR%
Block
1.0.0

Sets raw block data on a block from a string representation.

Examples
set block data to "facing=north"
fill (from|between) %a:LOCATION% (to|and) %b:LOCATION% with %mat:MATERIAL%
Block
1.0.0

Fills all blocks in a cuboid region between two locations with the given material.

Examples
fill from loc1 to loc2 with stone

Command

description %d:STRING%
Command
1.0.0

Sets the description of a command.

Examples
description "Teleports the player home"
name %n:EXPR%
Command
1.0.0

Sets the primary name of a command, useful if you need to have the command name based on a variable or expression.

Examples
name tp
aliases %list:EXPR%
Command
1.0.0

Adds comma-separated aliases to a command.

Examples
aliases tp, teleport, goto
namespace %ns:EXPR%
Command
1.0.0

Sets the namespace of a command.

Examples
namespace myplugin
permission %perm:STRING%
Command
1.0.0

Sets the required permission for a command.

Examples
permission "myplugin.admin"

Inventory

add %item:MATERIAL% %amt:INT% to %b:BLOCK% inventory
Inventory
1.0.0

Adds the specified amount of a material to a container block's inventory.

Examples
add diamond 3 to block inventory
add %item:ITEMSTACK% to %b:BLOCK% inventory
Inventory
1.0.0

Adds an item stack to a container block's inventory.

Examples
add myItem to block inventory
clear %b:BLOCK% inventory
Inventory
1.0.0

Clears all items from a container block's inventory.

Examples
clear block inventory