EssentialsX

EssentialsX

2M Downloads

hat says "you must have something to wear in your hand" for virtually every item

mrcoffee1026 opened this issue ยท 8 comments

commented

Information

Full output of /ess version:

[10:11:30 INFO]: Server version: 1.14.4-R0.1-SNAPSHOT git-Paper-175 (MC: 1.14.4)
[10:11:30 INFO]: EssentialsX version: 2.17.1.12
[10:11:30 INFO]: PlaceholderAPI version: 2.10.3
[10:11:30 INFO]: LuckPerms version: 4.4.1
[10:11:30 INFO]: Vault version: 1.7.2-b107
[10:11:30 INFO]: ChestShop version: 3.10-SNAPSHOT (build 152)
[10:11:30 INFO]: EssentialsXProtect version: 2.17.1.12
[10:11:30 INFO]: EssentialsXAntiBuild version: 2.17.1.12
[10:11:30 INFO]: EssentialsXSpawn version: 2.17.1.12
>  Server version: 1.14.4-R0.1-SNAPSHOT git-Paper-175 (MC: 1.14.4)

Server log: nothing coming up by other than than my typing of /hat in the log, no errors.

EssentialsX config: I don't think you'll need it for this issue if you do let me know

Details

Description
Hold various items and attempt to /hat. Every one I have attempted has responded with "You must have something to wear in your hand." Although another staff member managed to get SOMETHING to work as a hat, I couldn't duplicate it among anyone else.

Steps to reproduce
Hold anything: stick, stone slab, any block, player_head item in main hand and attempt /hat command.

Expected behavior
Should be wearing held items as hats.

Screenshots
I can screen shot the error message if you really don't believe me but this is the current behavior.

commented

This is a result of PR #2574.

If you're opped or have a wildcard permission such as essentials.* or similar, you're also inheriting all of the essentials.hat.prevent-type.<x> nodes (which won't let you put anything on your head at all).

To fix the issue you can negate essentials.hat.prevent-type.* in your permissions plugin. Also see #2753.

commented

Yes this was it, sorry. Would have expected there to be some docs on the permissions say on... this page - (and perhaps I'm using the wrong one for reference)
https://essinfo.xeya.me/index.php?page=permissions

commented

No, that's the one we recommend for use. However, the page is maintained by a volunteer (not the EssX team itself) so it may be slightly out of date at times. Sorry for the confusion.

commented

oh cool no problem then thanks for the information!

commented

Instead of essentials.hat.prevent-type.id why not just use essentials.hat.id and negate these as needed? Would make much more sense in my opinion.
E.g. allow players to wear anything but a barrier block

  • essentials.hat.* - allows any block
  • -essentials.hat.barrier or essentials.hat.barrier = false (e.g. in luckperms) - prohibit wearing a barrier
commented

Instead of essentials.hat.prevent-type.id why not just use essentials.hat.id and negate these as needed? Would make much more sense in my opinion.
E.g. allow players to wear anything but a barrier block

  • essentials.hat.* - allows any block
  • -essentials.hat.barrier or essentials.hat.barrier = false (e.g. in luckperms) - prohibit wearing a barrier

This has been discussed a lot before internally and what you mentioned would absolutely be a better approach, but at the time that this permission was added (by a contributor) this detail was overlooked.

That being said, this "issue" only affects you if you grant * / wildcard on Essentials permission nodes, which indicates that your permissions are probably set up incorrectly or lazily. So this is something for you to fix on your end too probably. ๐Ÿ˜ƒ

commented

Instead of essentials.hat.prevent-type.id why not just use essentials.hat.id and negate these as needed? Would make much more sense in my opinion.
E.g. allow players to wear anything but a barrier block

* `essentials.hat.*` - allows any block

* `-essentials.hat.barrier` or `essentials.hat.barrier` = `false` (e.g. in luckperms) - prohibit wearing a barrier

Since this issue was last touched in 2019, we've added extra checks on the specific permission node value so that high-level wildcards do not automatically impact the prevent-type sub-permissions, which renders this unnecessary. However, as stated by others, if you're using a * or essentials.* wildcard then you're granting dozens of likely undesired permissions across your server.

commented

Please don't bump years old issues. If you want to start a new discussion or suggestion please start one on the discussion page or no one's gonna see this.