LuckPerms

LuckPerms

41.4k Downloads

Permission does not support item durability, Can not use "*"

Natsukiw opened this issue ยท 3 comments

commented

/lp group builder permission set essentials.build.pickup.4554:0 false
This command only works if the subID is 0,When you change the sub-ID of the item with the ID 4554, it can be picked up again. For example, change the durability of the sword.
I tried the "/lp group builder permission set essentials.build.pickup.4554:* false" command, but it didn't work.

commented

The wildcard system in PEX isn't exactly the same as it is in LuckPerms.

Specifically, you can only use the * at the end of a permission.

However, LP does support a regex based system (the same as PEX), you just have to use a slightly different format.

The LP system uses normal regular expressions, so to implement the example you gave, you'd have to use:

R=essentials\.build\.pickup\.4554:.*

source: https://regex101.com/r/FsXzJw/1

The R= at the start of the node indicates to LP that it is a regex node, and the section following it is the expression.

So your full command would be:

/lp group builder permission set R=essentials\.build\.pickup\.4554:.* false

You can find more info here: https://github.com/lucko/LuckPerms/wiki/Advanced-Setup#regex

commented

This sounds more like an issue with a wrong permission, since it's more the job of essentials, to check, if the player has or has not the permission to pickup the item.
LuckPerms only "tells" the plugin, if the user has or has not the perm for it.

Use the verbose command to check, what permission is required for it to work.

commented

A durable item with thousands of sub-IDs, adding child IDs one by one is very cumbersome. And the permissions of "essentials.build.pickup.4554:*" are working in PEX, does not work in LuckPerms.