LuckPerms

LuckPerms

41.4k Downloads

Meta Formatting Producing Incorrect Stacked Prefix

Caaethil opened this issue · 4 comments

commented

Here is my editor link: https://luckperms.net/editor/8VHecGfywX

And here is my meta-stacking section:
meta-formatting { prefix { format = [ "highest_on_track_donor", "highest_on_track_league", "highest_on_track_staff", "highest" ] start-spacer = "" middle-spacer = " " end-spacer = "" duplicates = "first-only" } suffix { format = [ "highest" ] start-spacer = "" middle-spacer = " " end-spacer = "" } }

A player with the group "default" as well as a group on track "staff" will correctly only have the prefix from group "staff", as the staff group has a higher weight than default, so it will be displayed as a result of the "highest_on_track_staff" part of the prefix format, whereas "highest" will not display anything due to "first-only".

But, for some reason, a player with the group "default" as well as a group on either track "donor" or "league" will show both the prefix for their group on "donor"/"league" and the prefix for "default" (the "default" prefix appearing second in the stack). This is despite the fact that default is the lowest weighted group on the server, as you can see in my editor link. So, for a user with only "default" + "owner" (on "staff") and another user with "default" and "great" (on "donor"), I don't see why the prefix stacking would work differently.

I've seen the suggestion made that "first-only" is skipping over the "donor"/"league" rank because it was already selected elsewhere in the prefix stack, but from past experience I'm fairly sure this isn't the correct behaviour, and if it is, then there is still an issue because the "default"+"staff" combination isn't working this way, as mentioned before.

I had this set up working for a while, and it seems to have broken when I started adding some more groups (which aren't involved in prefix stacking at all) and redoing a lot of my groups' weights. I also started using nucleus' group-based chat formatting, but the issues mentioned here appear in the prefix section of "/lp user info" as well as in-game chat, so that I don't think that can have anything to do with the issue.

Running LuckPerms-Sponge-5.1.8.7 on spongeforge-1.12.2-2838-7.2.2. Thanks in advance.

commented

Be aware that group weights don’t matter here. Only prefix weights. Make sure they are in the correct order.

commented

Quick pastebin because that code block came out horribly: https://pastebin.com/9vf5A7Xa

commented

Yep, that was the problem. I think I did look for this, but I think I was looking at the meta under contextual data in group info and assumed that weight was the prefix weight because it displayed under the prefix and suffix. Sorry for the dumb issue, and thanks for the help. :)

commented

Don’t worry and you’re welcome.