Closed
Description
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:
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