Mojira Archive
MC-124137

Varieties of /teleport create ambiguities for tab-completion and syntax highlighting

The different syntaxes of /teleport introduce ambiguities for tab completion and syntax highlighting.

  1. Is the first argument destination or targets? "/tp @p <tab>" doesn't give tab completions for the <destination> argument. "/tp @a" doesn't complain that the <destination> argument may only return one entity.
  2. Is the first argument a player name or part of a set of coordinates? Attempting to teleport the player 1234321 to 0 0 0: type "/teleport 1234321" and start typing in the coordinates, after the y-coordinate, "1234321 0 0" will be highlighted as one argument even though it isn't.
  3. Is the second argument a player name or part of a set of coordinates? When I want to teleport myself to 0 0 0, I type "/teleport @p". After the x coordinate, it highlights the 0 in "/teleport @p 0" as a valid argument.

This could be fixed by introducing keywords or even subcommands like it was done to avoid ambiguities in /execute, or like it was done in /data.