TransWikia.com

Can scoreboard triggers be disabled?

Arqade Asked on March 15, 2021

Story

The trigger scoreboard type is used to allow players, even without cheats, to modify their value of a scoreboard objective. By typing /scoreboard players enable <playerName> <objective> this will allow that player, even without cheats, to use /trigger to change their scoreboard value. After triggering, that trigger is disabled again until the enable command is typed again.

Problem

While there is a command /scoreboard players enable, there isn’t a /scoreboard players disable. In other words, I can’t disable a trigger that has previously been enabled, and now I have to hope that the player doesn’t find out and use /trigger, or it will break my map.

Core question

Can scoreboard triggers be disabled? If so, how?

One Answer

You can't directly disable scoreboard triggers, but you can instead trick Minecraft into thinking that the player used /trigger, using /execute.

execute as @p trigger myObjective add 0

This command will disable the trigger of the nearest player. Because the /trigger is being executed by the nearest player, this makes Minecraft think that they use their trigger.

Correct answer by ExpertCoder14 on March 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP