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.
Thank you for your report!
We're tracking this issue in MC-123277, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Mojang Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! Please report any issues in Discord or Reddit