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

Command parsing inconsistency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.2
    • None
    • Unconfirmed
    • (Unassigned)

      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.

       

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

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

              Created:
              Updated:
              Resolved: