cloud
cloud copied to clipboard
To players who lack the permission to execute them, commands appear to not exist.
Using cloud-core, cloud-paper, and cloud-annotations, all 1.7.1.
If a player lacks the permission to execute a command, they will be unable to autocomplete it, and, if they manually enter the command, will be told by the client that the command does not exist. The desired functionality would be that the command is autocomplete-able, but throws a NoPermissionException when the player attempts to run it, which can be handled by an exception handler.
The documentation leads me to believe that this is the functionality, but I am not experiencing it.
will be told by the client that the command does not exist
I don't think the client has the final say on what commands exist. The client may thing a command doesn't exist, but when you send a command, it's still sent to the server. Then the server can do what it wants.
will be told by the client that the command does not exist
I don't think the client has the final say on what commands exist. The client may thing a command doesn't exist, but when you send a command, it's still sent to the server. Then the server can do what it wants.
Right, but I find the current behavior confusing in light of what the documentation states. The server does indeed recognize that the client sent the command, but no NoPermissionException is thrown, and hence, no message can be relayed to the client. I'm unsure of where to proceed other than the brute force method of just sifting through cloud's code, which I would prefer not to do since that would be a large time sink.
Just to add to the conversation, I prefer cloud-paper's current functionality for this as it matches vanilla Minecraft's behavior for commands. I'm pretty sure that the NoPermissionException is thrown if the player doesn't have access to a subcommand, though?
Just to add to the conversation, I prefer cloud-paper's current functionality for this as it matches vanilla Minecraft's behavior for commands. I'm pretty sure that the NoPermissionException is thrown if the player doesn't have access to a subcommand, though?
I don’t believe so; correct me if I’m wrong.
The NoPermissionException is only thrown when the executer does not have permission to the subcommand. Wish it would also be thrown if the executor does not have permisison to the root command.
This is intended behavior when using Brigadier mappings