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

Scoreboard slots are not case-sensitive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w31a
    • 1.15.1, 1.15.2 Pre-Release 1, 1.15.2, 20w06a, 20w07a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w14a, 20w16a, 20w17a, 20w18a, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 6, 1.16.2 Release Candidate 1, 1.16.3, 20w45a, 21w03a, 1.16.5, 21w06a, 21w10a, 21w14a, 21w16a, 1.17, 1.17.1, 1.18.1, 1.18.2, 22w12a, 1.19, 1.19.2
    • Confirmed
    • Commands
    • Low
    • Platform

      The Bug

      Scoreboard display slot names are not case-sensitive, which is inconsistent with item slots, many other arguments, and even scoreboard slots themselves.

      To Reproduce

      1. /scoreboard objectives setdisplay sidebar
        • No syntax error.
      2. /scoreboard objectives setdisplay SIDEBAR.team.aqua
        • Reports syntax error.
      3. /scoreboard objectives setdisplay SIDEBAR
        • No syntax error.

      Code Analysis

      Using yarn's mappings for 1.15.1.
      In net/minecraft/scoreboard/Scoreboard#getDisplaySlotId, equalsIgnoreCase is used, instead of simple equals.

        1. 2021-04-11_17.39.34.png
          663 kB
          [Mod] Avoma
        2. 2021-04-11_17.39.43.png
          661 kB
          [Mod] Avoma
        3. 2021-04-11_17.39.51.png
          682 kB
          [Mod] Avoma
        4. MC-169464.mp4
          4.35 MB
          [Mod] Avoma

            Unassigned Unassigned
            SPGoding [Mod] SPGoding
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: