command-framework icon indicating copy to clipboard operation
command-framework copied to clipboard

Add a flag system

Open saiintbrisson opened this issue 4 years ago • 0 comments

Flags will follow the same logic as flags in CLI programs, prefixed with -- or - for the shorthand.

Example usage: /mute SaiintBrisson -s --color=RED

I'm thinking of creating a new annotation called @Flag, scoped for methods, like the @Command annotation. Defining it will be something along those lines:

@Command(name = "foo")
@Flag(name = "bar", shorthand = 'b', acceptsValue = true, type = ChatColor.class)
@Flag(name = "baz", shorthand = 'z')
public void onCommand() {...}

saiintbrisson avatar Feb 15 '21 03:02 saiintbrisson