Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-124384

Trigger objectives are enabled by default

XMLWordPrintable

    • Confirmed

      I've thought about this confusing behavior a lot, and to me it seems like the only sane way to fix it is by making trigger objectives disabled by default. First, let's look at the situation:

      1. Set up a trigger objective:
        /scoreboard objectives add t trigger
        
      2. Try to trigger it:
        /trigger t
        

        → "You cannot trigger this objective yet"

      3. Enable the objective:
        /scoreboard players enable @p t
        

        → "Nothing changed, that trigger is already enabled"

      4. Try another time to trigger the objective:
        /trigger t
        

        → This time, it works!

      Now, why does it work in step 4, but not in step 2? Because step 3 initialized the objective, which seems to be WAI considering a bug related to exactly this behavior was fixed recently (MC-79255).

      Note that this situation changed slightly from 1.12.2, in that enabling a trigger objective always succeeded in 1.12.2, even if it was already enabled.

            dinnerbone [Mojang] Nathan Adams
            redstonehelper [Mod] redstonehelper
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: