Open SirSalad opened 2 years ago
It's not really wrong per se. When building the command tree, the root note will end up with an OR-permission that is built up by the command permissions. It's failing on this OR-permission because the sender lacks permission to use any of the commands.
Because of the way parsing works, we never even attempts to traverse the tree further if we fail that early, thus we don't really have information about which command that was actually going to be executed, had the permission checks passed. Therefore I am not really sure if there's a good way to "solve" this.
When the command sender has no permissions relevant to the command manager, and attempts to use a command, NoPermissionException will have all permissions rather than the appropriate one.
Versions: cloud-paper 1.6.2 and 1.7.0-SNAPSHOT (bcc9d30)
Code:
Output: