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

Objective names with "-" in it are considered invalid

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.6.2, Minecraft 1.8.1-pre3
    • Fix Version/s: None
    • Environment:
      • Windows 7 x64,
      • Java version: Version 7 Update 21
    • Confirmation Status:
      Confirmed
    • Game Mode:
      Creative

      Description

      I've found that, with scoreboard objectives, if the objective has a dash ("-") in the name, then the score argument for command blocks will treat it as invalid, which also displays MC-9097.

      To reproduce:

      1. Start a new world and give yourself a command block.
      2. Type in the command say @p[score_Foo-bar=44]
      3. Power the command block and it should say your name.
      4. Click on the command block and remove the "-" so it should now be say @p[score_Foobar=44]
      5. Power the command block again and notice how it doesn't say your name this time.

        Attachments

        1. dashcommandoutput.png
          dashcommandoutput.png
          73 kB
        2. minecraft1.6.2.png
          minecraft1.6.2.png
          87 kB
        3. no_objectives_players.png
          no_objectives_players.png
          84 kB
        4. nodashcommand.png
          nodashcommand.png
          86 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                needagoodusername NeedAGoodUsername
              • Votes:
                3 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: