Skip to content

Registering aliases? #7

@adamtomi

Description

@adamtomi

I was wondering if it's possible to register aliases to certain commands using the commodore file format. Right now I have something like this:

InputStream is = //...
LiteralCommandNode<?> commandNode = CommodoreFileFormat.parse(is);
CommandNode hologramCmd = commandNode.getChild("hologram");
LiteralCommandNode child = LiteralArgumentBuilder.literal("holo")
               .redirect(hologramCmd)
               .build();

commandNode.addChild(child);
commodore.register(command, commandNode);

which is obviously not that great since I'd have to write something like shown above for all aliases. Is there a better solution for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions