8000 The documentation badly needs an optional arguments section · Issue #387 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content
The documentation badly needs an optional arguments section #387
Closed
@JorelAli

Description

@JorelAli

Description

Too many people ask about optional arguments and the documentation doesn't help at all! Searching for this in the documentation points to a misleading and unhelpful:
image

Expected code

new CommandAPICommand("mycommand")
  .executes(...)
  .register();
new CommandAPICommand("mycommand")
  .withArguments(new PlayerArgument("optional"))
  .executes(...)
  .register();

And CommandTrees:

new CommandTree("mycommand")
    .executes(...)
    .then(new PlayerArgument("optional")
        .executes(...)
    )
    .register();

Extra details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestimplemented for next releaseThis has been implemented in the current dev build for the next public release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0