All commands
๐ŸŽš๏ธ
AdvancedJava โœ“Bedrock -

/trigger

Let non-op players change their own enabled objective score.

๐ŸชจThis command is Java Edition only - Bedrock has no direct equivalent.

Overview

What is the /trigger command?

The /trigger command is the one scoreboard command non-operators are allowed to run, letting map makers offer safe player interactions like clickable chat menus and shop buttons. A player can only trigger objectives an operator has enabled for them.

It's the bridge that lets ordinary players 'press buttons' in a datapack without giving them full command access.

When to use it: Use /trigger to let non-op players safely activate map features โ€” menus, shops, votes โ€” via enabled trigger objectives.

At a glance

Syntax

Syntax
/trigger <objective> [add|set] [value]
commandtargetcoordsvaluerequiredoptional

See it

What it does

+1
No operator powers needed
Players bump their own score

Anatomy

Every part, explained

  1. 1
    /triggerCommandRequired

    Changes a trigger objective for yourself.

  2. 2
    <objective>ObjectiveRequired

    A trigger-type scoreboard objective.

  3. 3
    [add|set]ModeOptional

    Add to or set the value.

  4. 4
    [value]ValueOptional

    The number to add or set.

Your turn

Try it yourself

Playground
4 tokens ยท press Enter to run

Copy & paste

Examples

/trigger myObjective add 1

Add 1 to your trigger.

/trigger myObjective set 5

Set your trigger to 5.

/trigger myObjective

Fire the trigger once.

Avoid these

Common mistakes

โœ•/trigger myObjective add
โœ“/trigger myObjective add 1

Add and set need a number.

โœ•/trigger @s myObjective add 1
โœ“/trigger myObjective add 1

Trigger only affects yourself, no target.

Good to know

Frequently asked questions

What does /trigger do in Minecraft?
It lets a player modify a special 'trigger' scoreboard objective they've been granted, enabling safe interactions without op permissions.
Why does /trigger say I can't use that objective?
The objective must be of the trigger type and enabled for you with /scoreboard players enable. Until then, /trigger is blocked.
How do map makers use /trigger?
They show clickable text that runs /trigger, so players can pick options or buy items while a datapack reads the value.

Keep going

Related commands