LuckPerms

LuckPerms

41.4k Downloads

Luckperms Default command permission, Tab completion removal, no permission return message editing.

wiviw5 opened this issue ยท 2 comments

commented

Description

Currently when a user has no permissions to anything of the plugin: (Set via "luckperms.*" false) users still see the "/luckperms" tab autocomplete suggestion & when running any of them still see the output of not having permission for any of the sub commands (and see running version)
See picture below for more context.

This has been suggested before within: #3176 however I don't think the point was gotten across all that well/shown what the actual issue was.

javaw_bpYYnHytVV

Proposed Behaviour

My suggestions are as below to solve this:

  1. Within the config.yml file of luckperms. Have a couple new settings to toggle/add new behavior to the default commands/aliases
  • remove tab completion by players without luckperm permissions (Defaults to false, when set to true players do not see tab completion output)
  • luckperms permission error output (defaults to none, (aka, normal error output of the running and no permission error) When set, you can enter a string that will be shown to the user instead of the typical no permission error & LP version. This way you can customize the color and look of the error.)
  1. Give the default /luckperms command a permission that can be removed (luckperms.command, which is included within luckperms.*)

Extra Details

Why is any of this necessary?

As a server owner, I'd like to create a cohesive experience, and the overall style of luckperm's errors & commands detracts from it slightly. If there were options to disable it then a player in the server sees the entire operation to luckperms as invisible. (It also allows a server owner to create a clean tab complete list with commands that the player can use only, making sure that the experience is much more clean.

If this is not added due to implementation time taking too long, I understand. I'll be making my own fix for it and submitting a pull request later if there is at least some interest to having the options available. If this suggestion is denied I will not make a pull request and not bother the project anymore over this. Thank you for your time.

commented

I'd like to make an amendment to this:

Doing more research on this has lead me to discovery of the exact way I've fixed it for myself personally:

Editing the jar file myself (or adding to the plugin.yml file) this line:

commands:
  luckperms:
    description: Manage permissions
    aliases: [lp, perm, perms, permission, permissions]
    permission: luckperms.testcommand

(The permission is just a random name, just to make sure it wasn't taken by anything else)

This completely fixes the issue I was having with inconsistent permissions errors and access to the tab autocomplete commands.
Execution example:
image

So it'd be as simple as a fix for the older bukkit versions only to add that one line permission: luckperms.testcommand for other versions and that I do not know and I cannot test. Hopefully this helps out someone. And I'll submit a pull request here with something better for the permission's name as at least an example to follow for hopefully other MC versions as well.

commented

The permissions for LP commands are per sub-command, meaning for example, I can give someone luckperms.user.info and they can use /lp user <user> info, they don't need anything else.

With your suggestion, they would need both luckperms.user.info and luckperms.testcommand (or whatever we decided to name it). This would be a step backwards in my opinion, especially as I don't see it as a big deal in the first place that users can see the version number when they run /lp.

However, if it does bother you, then my suggestion would be to use a separate command blocker plugin to intercept the command before it is handled by LuckPerms.