LuckPerms

LuckPerms

41.4k Downloads

Possibility of using regex in a command?

andrewkm opened this issue ยท 2 comments

commented

Am I able to use regex in the commands some how?

Example, instead of using:
lp user {uuid} parent remove skyblock_sizeincrease5 skyblock
I want can somehow:
lp user {uuid} parent remove skyblock_sizeincrease.* skyblock

skyblock_sizeincrease1 skyblock_sizeincrease2 skyblock_sizeincrease3 skyblock_sizeincrease4 etc are all groups that we have, would be cool if I can remove all groups with one command, is this possible?

Perhaps:
/lp user valese parent remove skyblock_playervaultsR=.* skyblock
or
/lp user valese parent remove R=skyblock_playervaults.* skyblock

Not really sure how it would work or if it does. Please let me know.

commented

Uh no, it's not possible to use regex to match other entries.

Wildcards are the R= regex flags are used for wildcard / regex permissions - the remove commands are always an exact match.

https://github.com/lucko/LuckPerms/wiki/Advanced-Setup#shorthand-permissions

If you want to remove lots of entries at once, I suggest using the web editor

commented

The whole reason I was looking for a command based regex was to automate it through buycraft in certain use cases. @lucko if you ever consider a command based wildcard in the future would be really great!