Modifies a scoreboard objective with a "trigger" criterion. Allows non-operator players to modify their own scoreboard objectives under tightly controlled conditions. Often used to let players activate systems controlled by data packs or command blocks.
1to the current value of
trigger <objective> add <value>
<value>to the current value of
trigger <objective> set <value>
- Sets the value of
- An enabled scoreboard objective with the "trigger" criterion.
- It must be an valid scoreboard objective name.
- Specifies the value to be set to or added to the objective.
- Must be a 32-bit integer number.
|any||the arguments are not specified correctly||Unparseable|
|the objective does not exist||Failed|
|the objective isn't the "trigger" type|
|the executor is not a player|
|the executor isn't on the scoreboard objective.|
|the objective has not been "enabled" for the player|
|On success||Changes the value of the objective and the objective is un-enabled for the player.|
|any||Java Edition||On fail||0||0||0|
|On success||1||1||The objective's score of the player after the command is executed.|