Skip to content

A proposal for command modding and ambiguous commands #3125

@IntegratedQuantum

Description

@IntegratedQuantum

Commands are a bit of a special-case:
Mods will inevitably want to add commands with the same name. For all other assets this is solved by adding mod: in front of it, but for commands this would be rather annoying. Autocomplete would make this bearable, but it would still make commands needlessly long.

Beyond that there is a second problem: Ambiguous commands. As commands get more complex we (or a mod author) may find ourselves in a situation where multiple results may be parsed. One example of this would /tp <biome> and (hypothetical) /tp <structure>, if any biome id matches a structure id, it is unclear where to tp the player.

To solve this I propose to send an error to the player when this happens and give them an option to resolve the conflicts, possible message:

Found ambiguous arguments for command ..., could be
/tp[1] <biome>
/tp[4] <structure>

The numbers would be the index based on the order of the command arguments union (and the order of mods), to select one variant you could then just run /tp[1] cubyz:xyz

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething isn't working in the intended wayengine

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions