News
Game
Guides
Downloads
Versions
/trigger
COMMANDS COMMAND BLOCKS & MAPS EVERYONE Added in 1.14 or earlier

/trigger command in Minecraft

/trigger lets players without cheats change their own score in an objective of type trigger. Maps and servers use it for menus, votes and clickable chat buttons: the player triggers a value, and a command block or a function reacts to it.

Syntax

/trigger <objective> [add|set]
ArgumentExpectsWhat it does
objectiveScoreboard objectiveObjective of type trigger that was enabled for you, for example menu or vote.
valueoptionalWhole numberWhole number to add with add, or to set with set. Without it, 1 is added.
All 3 forms
  • /trigger <objective>
  • /trigger <objective> add <value>
  • /trigger <objective> set <value>

Examples

Create a trigger objective

/scoreboard objectives add menu trigger

Creates the menu objective of type trigger, the only kind /trigger accepts.

Java 26.3

Unlock it for every player

/scoreboard players enable @a menu

Allows all online players to use /trigger menu once.

Java 26.3

Trigger as a player

/trigger menu

Adds 1 to your menu score, then locks the trigger until it is enabled again.

Java 26.3

Choose option 3

/trigger menu set 3

Sets your menu score to exactly 3, for example to pick the third entry of a menu.

Java 26.3

React in a command block

/execute as @a[scores={menu=1..}] run function mypack:menu

Runs the menu function for each player whose menu score is 1 or more. Reset and enable the score again inside it.

Java 26.3
Build your command

Fill in the fields, then copy the command.

Command generator

Set up a trigger

Create the objective with /scoreboard objectives add menu trigger, then unlock it with scoreboard players enable @a menu. A player can now type /trigger menu (adds 1), /trigger menu add 5 or /trigger menu set 3. After each use, the trigger is locked again for that player until it is enabled once more.

React to the value

A Repeating Command Block or a tick function checks the score and runs the action: execute as @a[scores={menu=1..}] run function mypack:menu. In that function, reset the score with scoreboard players set @s menu 0 and unlock it again with scoreboard players enable @s menu. Clickable text from /tellraw or a button in a /dialog can run /trigger for the player, which makes it the standard way to build menus that need no operator rights.

Common errors

"You cannot trigger this objective yet" means the trigger was not enabled for you, or you already used it. "You can only trigger objectives that are 'trigger' type" appears when the objective uses another criterion, such as dummy. Only players can run /trigger: a command block or the server console cannot.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

/trigger: FAQ

Why does /trigger only work once?

Each use locks the trigger for that player. Run scoreboard players enable again after handling the value, usually in the same function.

Can /trigger lower a score?

Yes. add accepts negative numbers and set accepts any whole number, for example /trigger vote set -1.

How do I use /trigger?

Type it in the chat, no cheats needed: /trigger <objective> [add|set].

Who can use /trigger?

Every player.

Related commands