/trigger
Modifies a scoreboard objective of type 'trigger'. This command can be used by non-operator players, making it useful for custom maps and voting systems.
Syntax
/trigger <objective> [add|set <value>]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| objective | objective | Required | The scoreboard objective to modify. Must be of the 'trigger' criteria type. |
| action | literal | Optional | Either 'add' or 'set'. Defaults to add 1 if omitted. |
| value | integer | Optional | The value to add or set. |
Examples
/trigger voteIncrements the 'vote' trigger objective by 1 for the executing player.
/trigger shop set 3Sets the 'shop' trigger objective to 3 for the executing player.
/trigger warp add 5Adds 5 to the 'warp' trigger objective.
Common Mistakes
- Trying to use /trigger on an objective that is not of the 'trigger' type, only trigger-type objectives work.
- Forgetting to enable the trigger for the player with /scoreboard players enable, triggers must be enabled before use.
Notes
Permission level 0 means all players can use this command. The trigger must be enabled for each player using /scoreboard players enable. After triggering, it is automatically disabled until re-enabled.
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting