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

Command parsing inconsistency

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 1.16.2
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      When using a command which creates an objective, the name for such thing is only checked upon execution, whereas in every other circumstance, it gives an inline error immidiately.

      Example:

      scoreboard objectives add aaaabbbbccccdddde dummy
      

      produces no error unless it is executed, where it correctly states that the objective name cannot exceed 16 characters.

      However, in a command such as this:

      scoreboard players set @s aaaabbbbccccdddde
      

      It doesn't even recognise it as incorrect (too long) unless the commands are run.

      Essentially, the command parser does not flag commands that would error as incorrect before they have errored in these circumstances.

      This is likely because of the parser internally used for creating a team and an objective is the brigadier string parser, with a "word" type, which has no restriction on string length, as opposed to the parser "minecraft:objective" which checks that the length of the string immidiately.

      Meanwhile, "minecraft:team" doesn't seem to do that either, and seems to not even care, which is probably why it throws an error saying that the team doesn't exist - it's assuming that whatever you're giving it has to be correct, otherwise the team wouldn't exist. This is in disparity to objectives (parser "minecraft:objective") where it checks the length - not existence, first.

       

        Attachments

        1. report1.png
          report1.png
          8 kB
        2. report0.png
          report0.png
          13 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              SirSheepe SirSheepe
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: