LuckPerms

LuckPerms

41.4k Downloads

Feature Request: Per-group prefix stacking

AeSix opened this issue ยท 3 comments

commented

The problem:
I currently have a list of non-linear groups which may each be applied with or without others being applied to the user. For me to apply the suffix, I am required to create a track for each group to add the track to the stack. This is cumbersome and adds additional work for maintenance and setup.

A couple of /potential/ solutions:

  1. Make a own_group_ stack element, which would then grab the prefix/suffix from the group and apply to the stack.
  2. A bit less classy, a force-show-prefix and force-show-suffix keypair in the group meta to force showing - with the cost of losing the ability to define where in the stack it is placed.

Some other thoughts:
I am not a developer and cannot PR this, nor do I even know if it's possible to do with the way LP is built. I hope someone will be able to take this idea, run with it, polish it up and get it added to LP. I understand if this is pushing scope and will be denied however, as there is a solution, cumbersome as it is.

Additionally, if this is the wrong place to request features, I apologize. Please inform me of the proper place if I should correct this.

commented

For purposes of meta stacking, tracks are just a collection of groups used to determine which groups prefixes/suffixes should be "selected" from

I don't think either of your suggestions are any neater / easier than this.

There already are own-group elements, but I'm not sure they're the same as what you're suggesting??

https://github.com/lucko/LuckPerms/wiki/Prefix-&-Suffix-Stacking#how-do-i-add-other-elements

commented

Yeah, I see those. The problem is that they are highest or lowest, not each.

In my case, players will be able to obtain "mature", "champion", "dragoner" and "voter" in different ways, each giving different permissions, and each having a different suffix to show they have attained these. It would be possible for a player to have all 4 suffixes (for curiousity's sake, the suffixes are a single character width symbol).

In order to do this, I have to give a track for each singular group so I can specifically define that group's suffix in the stack, otherwise the weights will disallow any of them from being viewed. If I were to use the highest/lowest own element, one would override the others, or all 4 could be overridden by another track's. So, the track system, unless I abuse it with a single group per track, won't work.

I'm not sure if this helped to understand, but regardless I accept your call on not taking it further. Thank You! :)

commented

Yes, I get what you mean now :)

Implemented in 20f9921