Add support for the permission requirement for flags
Hello, can you please implement @FlagPermission("flag_name", "permission.for.this.flag") this will be quite useful, for example, if you make the /kill command and that the player cannot use /kill --forced if there is no right.
my idea:
maybe @Flag(flag = "--force", permission = "command.flag.force")
temponary solution: just create another command definition's:
@Command(name = "kill --force)
@Permission("permission")
Important:
Using your (or my idea) idea makes the commands definition execute(context, arg1, arg2, arg3, flag, flag, flag, flag, [...]) harder to read.
Yes, that's true, but it's still better to use flag for such moments, but it's a pity that you can't add permission for the flag. I liked your idea. I hope they can implement it.
my idea:
@Flag("-flag") @Permission("some.permission") boolean flag