The goal that the player has no right changes itself is the command /trigger. It can only work if it's turned on by an enable command; after pressing, it turns off again. This is how menus and buttons in chat are done.
On page 8 sections
Briefly
Create target and display - two commands
-
Create target
/scoreboard objectives add menu trigger "Меню" -
Show on the right side of the screen
/scoreboard objectives setdisplay sidebar menu
Account: any number - what will put /trigger. Target name in commands - menu, you can take any one.
On the right side of the screen there is one target for everyone; in the tab and under the nickname - also one each.
-
On the right side of the screen
/scoreboard objectives setdisplay sidebar menu -
In the list of players (Tab)
/scoreboard objectives setdisplay list menu -
Under the nickname
/scoreboard objectives setdisplay below_name menu -
Remove from right side
/scoreboard objectives setdisplay sidebar
-
Enable everyone
/scoreboard players enable @a menu -
Press (player)
/trigger menu -
Bet 2 (player)
/trigger menu set 2 -
Reset press
/scoreboard players set @a menu 0
The last line is a condition: the command will work for those whose scores fall within the range. She is placed in the command block.
-
Find out your score
/scoreboard players get @s menu -
Reset to zero for everyone
/scoreboard players reset @a menu -
Delete target
/scoreboard objectives remove menu -
Condition
/execute as @a if score @s menu matches 1.. run say Нажал кнопку!
| What | Meaning |
|---|---|
| How to write in a command | trigger |
| What counts? | any number - what will put /trigger |
| Read only | no |
| In the default tab | number |
What does Trigger think?
The goal that the player has no right changes itself is the command /trigger. It can only work if it's turned on by an enable command; after pressing, it turns off again. This is how menus and buttons in chat are done.
How to create a trigger target?
By command /scoreboard surveyives ad manu trigger "Menu". The target name (here menu) can be taken by any person.
How do you show a trigger under a nickname?
Create a target by command /scoreboard surveyives ad menu trigger "Menu" and show it: /scoreboard objectives setdisplay below_name manu. In taba, the same with list instead of below_name.
- Empty target
- Death counter
- Player Kills
- All kills
- Health
- Experience Points
- Experience Level
- Satiety
- Air supply
- Armor Points
All criteria Command /scoreboard/trigger command
According to Minecraft 26.3, the criteria, units and names are from the game's code and localization, each command on the page is checked by reviewing the game itself.