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

/trigger prints incorrect error message for players who do not have a score for an objective

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 14w07a, Minecraft 14w32d, Minecraft 14w33a, Minecraft 14w33b, Minecraft 14w33c, Minecraft 14w34b, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.6, Minecraft 1.8.8, Minecraft 15w33b, Minecraft 15w33c, Minecraft 15w40b, Minecraft 17w06a
    • Confirmed

      The bug

      Using /trigger for a player who has no score for an objective (see MC-79255) shows the error message commands.trigger.invalidObjective:

      Invalid trigger name [objective name]
      

      This is pretty misleading and should instead be something like

      The player [player name] has no score entry for the objective [objective name]
      

      If this is no bug, tab-completing the objective argument on /trigger should not return invalid objectives.

      How to reproduce

      /scoreboard objectives add someObjective trigger
      /trigger someObjective set 1
      

      Will print "Invalid trigger name someObjective" in chat. Note that trigger objectives that aren't enabled print a different message: "Trigger someObjective is not enabled". Giving the objective a value or enabling its trigger for the player will make it work:

      /scoreboard players set @p someObjective 0
      /trigger someObjective set 1
      

      Will set someObjective to 1 for me.

            searge [Mojang] Searge (Michael Stoyke)
            redstonehelper redstonehelper
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: