LuckPerms

LuckPerms

41.4k Downloads

Duplication Check

DiamondMan0007 opened this issue ยท 3 comments

commented

Description

A command that checks for duplicate permission nodes (with the same values. expiry, and contents)

Proposed Behaviour

What this command would do is tell you when you have duplicate permissions nodes within a group and/or a track.
/lp Check Dupes <Group/Track>
or alternatively
/lp dupes
You could also set it up so that when there's dupes in the same group that they highlight red (or orange if its an unsaved change)

Edit: Ontop of this, you could add a command to check for invalid permission nodes within any groups
/lp check Invalid
or alternatively
/lp invalids

Extra Details

The reason im suggesting this is because i have an issue of going over the same permissions or forgetting to add/change/delete something and will tend to go back over the same permissions i already went over.

commented

i have an issue of going over the same permissions or forgetting to add/change/delete something and will tend to go back over the same permissions i already went over.

the editor lets you search for permission nodes in the loaded data. you can use that to see if you have already added something, or search for a specific thing to remove

commented

The search function is great for when you're looking for something specific, but this is more for if you have dupes and you dont notice them they would appear in red/orange, with a simple scroll you'd have your answer

commented

LuckPerms won't let you add two permissions that are exactly the same (same key/value/contexts)

Any futher de-duping (e.g. looking at overlapping wildcard permissions) is probably out of scope for the main plugin, but you could write something yourself using the API.