Expressions
Value-producing patterns that resolve to Java expressions.
Attribute
get %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% [base] [value]Returns the base value of an attribute on a living entity, or 0 if the entity does not have the attribute.
set hp to mob's max_healthget %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% (effective|total) [value]Returns the effective (total with modifiers) value of an attribute on a living entity, or 0 if the entity does not have the attribute.
set totalHp to mob's max_health effectiveget %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% default [value]Returns the default value of an attribute on a living entity, or 0 if the entity does not have the attribute.
set defaultHp to mob's max_health defaultBlock
[get] block at %loc:LOCATION%Returns the block at a given location.
set b to block at loc[get] %b:BLOCK% typeReturns the material name of a block's type.
set t to block type[get] %b:BLOCK% locationReturns the location of a block.
set loc to block location[get] %b:BLOCK% worldReturns the world the block is in.
set w to block world[get] %b:BLOCK% (x|y|z)Returns the x, y, or z coordinate of a block.
set x to block x[get] %b:BLOCK% light levelReturns the light level at a block's location.
set light to block light level[get] %b:BLOCK% data [string]Returns the block data as a string representation.
set data to block dataData
new %body:EXPR%Creates a new data instance. Use 'with' to set fields: new arena with name "x" x1 5
set a to new arenaset a to new arena with name "PvP" x1 0 y1 0 z1 0 x2 100 y2 100 z2 100get field %field:STRING% (of|from) %obj:EXPR%Gets a field value from a data instance.
set name to get field "name" of myArenaset x to get field "x1" from myArena%obj:EXPR% field [of] %field:STRING%Gets a field value from a data instance using postfix syntax.
set name to myArena field "name"Location
new location in %w:WORLD% at %x:INT% %y:INT% %z:INT%Creates a new Location from a world and XYZ coordinates.
set loc to new location in myWorld at 100 64 -200new location at %x:INT% %y:INT% %z:INT% in %w:WORLD%Creates a new Location from XYZ coordinates and a world.
set loc to new location at 100 64 -200 in myWorld