This feature is exclusive to Java Edition.
Commands/infobox
Modifies a scoreboard objective with a "trigger" criterion.
- Syntax
trigger <objective> [<add|set> <value>]
- Description
- Used together with
/tellraw
to let players activate systems made by operators or mapmakers.
- Required Arguments
- objective
- An enabled scoreboard objective with the "trigger" criterion.
- Optional Arguments
- add|set
add
– Adds value to the current value of objective.set
– Sets the value of objective to value.
- Result
- Fails if the arguments are not specified correctly, if objective does not have the "trigger" criteria, or if the player who executed the command is not able to modify objective.
- On success, the value of objective is changed for the player that executed the command.