Argument Types - accidentallyc/soa-maestro-issues GitHub Wiki
Trigger Parameters
Each listener to a trigger can be parameterized to an extent but all parameters are optional. Some parameters have a common type that is used across all the triggers, these parameter types are the entity type, the block type and the item type parameters.
Entity Type Parameter
These are most commonly used in either src and tgt parameter.
For illustration purposes look at the command below. This command will look for the nearest red-team player with atleast 100 points and tell him "you won!".
/maestro trigger when @EntityDeath "tell @s dead!" {src:{score:{points:100}, team:red}}
Parameters | Data Type | Description |
---|---|---|
id | String | Accepts an Entity Id. |
name | String | Ignore text components like color |
health | Integer | Each heart is worth 2 points |
level | Integer | |
team | String | |
tag | String | |
score | Integer Map | |
inventory | Item Type Param | Scans the entity's entire inventory |
mainHand | Item Type Param | |
offHand | Item Type Param | |
helmet | Item Type Param | |
chestplate | Item Type Param | |
leggings | Item Type Param | |
boots | Item Type Param |
Block Type Parameter
Parameters | Data Type | Description |
---|---|---|
id | String | Accepts a Block Id |
state | Mixed Map | Accepts a string as a key, and either a string, boolean, or number as a value. See Blockstates |
Item Type Parameter
Parameters | Data Type | Description |
---|---|---|
id | String | Accepts an Item Id |
count | Integer | |
name | String | Ignore text components like color |