EssentialsX

EssentialsX

2M Downloads

Permissions flooded by essentials.hat.prevent-type

blindcat97 opened this issue ยท 6 comments

commented

Feature request

Feature description
Essentials generates a massive number of individual permissions nodes under essentials.hat.prevent-type , one for essentially every single item in the game. This makes permission lists extremely bloated, and is essentially a huge number of permissions that are completely unnecessary for the majority of people. It also makes visual editors completely overload (in this gif is luckperms web editor, and because of essentials, their 1000 node limit is surpassed, meaning that the list won't scroll any further and all other perms had to be added completely by hand).

To me it makes a lot more sense to have this sort of thing be controlled by config. My server doesn't even use /hat at all, and a simple config option to disable the feature entirely (and prevent/remove its outrageous number of permissions) would be ideal. Also, I'm fairly certain that a global control on allowed/banned items would be a better baseline, with perms acting as exceptions rather than defaults. If you wanted to make sure no one can use 50 items, you'd have to bloat their permissions with 50 specific nodes, which is quite a lot.

How the feature is useful
Although it won't have much affect on players, it might make their experience smoother by making life easier for server owners who have to manage these things. It'd definitely make things easier for luckperms users, as even with only luckperms and essentials installed, the web editor becomes useless for anything that falls after the hat perms.

Additional notes
I understand that this might not be something you're interested in pursuing with essentials whatsoever. If you genuinely think it should just be luckperms' problem, or just a "get over it" kind of thing, just let me know please. I've also got an active issue with the team for luckperms web editor, but this strikes me as something that'd be more within essentials' pervue to change.

commented

The new hat permissions have been problematic for a variety of different reasons. They're just really not well designed. No promise that anything will be done immediately, but we'll leave this issue open for now. There have been conflicting opinions on simply nuking the current permissions (since it would break setups for anyone already using them) and replacing them with something that works better, but honestly the more this comes up the better it seems to just do something about it sooner rather than later.

commented

+1.
All permissions that would have been viewable in LuckPerm's web editor are inaccessible due to LP limiting the amount of permissions viewable in their web editor. The problem isn't mainly the amount of preventtype permissions that appear, rather that it completely chews up the permissions list and reaches the permissions limit.

I am very much in favour of the 'config option to disable it', as although my server does allow the /hat command, I don't prevent people from using whatever item they can obtain.

Maybe, LP could implement something to exclude certain permissions from appearing (e.g. john.* would prevent john.smith, john.doe, etc) - this could be applied to essentials.hat.prevent-type.*. I will forward this idea to the LP issue tracker.

commented

I opened an issue with them before, and essentially that the menu is overloaded like that is really not their fault. When I was messing around in the Inspector to look at the page code, I saw that the list is limited to 1,000 items, which is plenty for any normal use. Although blocking certain groups would be useful, this particular situation really is a problem with how Essentials is coded. Allowing hats based on over 3,000 specific permission nodes is pretty crazy.

It was mentioned above that the Essentials team was considering fully replacing that system. Although I understand why it would be annoying for existing setups, it's so clumsy that there's probably fewer elaborate setups than you might expect with other features. LuckPerms definitely isn't the only issue here.

Black/whitelisting items has always been something most plugins set up in the config files, including with support for standard permission grouping, so I don't see why that shouldn't be the case here. Besides, typing up all of the possible filters you might want to use is probably much easier in a text editor than trying to jam a hundred nodes into your permissions plugin. That's just my take; hopefully more attention is brought to the issue soon.

commented

I opened an issue with them before, and essentially that the menu is overloaded like that is really not their fault. When I was messing around in the Inspector to look at the page code, I saw that the list is limited to 1,000 items, which is plenty for any normal use. Although blocking certain groups would be useful, this particular situation really is a problem with how Essentials is coded. Allowing hats based on over 3,000 specific permission nodes is pretty crazy.

It was mentioned above that the Essentials team was considering fully replacing that system. Although I understand why it would be annoying for existing setups, it's so clumsy that there's probably fewer elaborate setups than you might expect with other features. LuckPerms definitely isn't the only issue here.

Black/whitelisting items has always been something most plugins set up in the config files, including with support for standard permission grouping, so I don't see why that shouldn't be the case here. Besides, typing up all of the possible filters you might want to use is probably much easier in a text editor than trying to jam a hundred nodes into your permissions plugin. That's just my take; hopefully more attention is brought to the issue soon.

Completely agree with what you've said.

Possibly, something like this could be done:

hat-prevent-type-groups:
  everyone:
  - 'BEDROCK'
  member:
  - 'TNT'
  - 'DIAMOND_BLOCK'
  vip:
  - 'DIAMOND_BLOCK'

However, as you stated in your original post, an easy way to disable it such as enable-hat-prevent-type-permissions: true or something would be easier to implement and achieve the same outcome that LuckPerms users wish.

commented

Not an essentials problem, a QOL feature would be for LuckPerms to let plugins specify permissions as un-important (and thus not send them to web-editor/tab completion)

For core team, see this for internal discussion around this issue: https://discord.com/channels/390942438061113344/395279435538104320/759509483243700266

CC @Laarryy

commented

Thanks for the reply,
Lucko recently updated LuckPerms addressing this issue. Here is his comment.