Meta Priority
Closed this issue ยท 23 comments
hey,
is there currently a way to set a priority for meta entries like you can do for prefix/suffix? If not any chance this could get added?
I tried to workaround this by creating a group with the meta and setting a higher weight but this weight seems to be ignored if you add the group as parent to a group with a lower weight.
No meta nodes don't have a priority - and I think adding a weight property would be beyond what they should be used for.
The full accumulated ListMultimap is exposed in the API - with values in the order they were inherited.
@lucko is the meta list (/perm user ... meta info) ordered by weight?
Hm, any idea how I could solve that without creating a new plugin and using the LP api?
No, I'm trying to get nucleus to use the home-count 8 (which comes from the inherited group perms_home8
which has a higher weight then tier2
) instead of the home-count 3 (which comes from tier2
group).
The tier2
group is directly added to the user while perms_homes8
is a tempgroup which the user inherits from the default group.
I've re-opened this to remind myself to reply - and will leave it open until we can work out a solution :)
I'm quite tired at the moment so can't really give this issue my full thought - I'll try look into this a bit more / work out a reply sometime tomorrow - if that's okay. ๐
Ok, that ^ commit will make the meta info
command output in values in inheritance order - which is the same order used by the getOption
method in the LP sponge implementation.
That's simply because tier2 and tier1 are being inherited before perms_homes8 and perms_homes5
You also need to consider the weights of the groups they're inherited through.
Those will be considered first
Unfortunately I can't change that for the default group. I guess there is no other way in giving the group to everyone and overwriting their existing groups?
Uhh nope, that's the nature of how the system works.
You might be able to change the inheritance order mode to achieve what you want - but beyond that, there's not much I can do, this is intended behaviour of the system.
https://github.com/lucko/LuckPerms/wiki/Configuration#inheritance-traversal-algorithm
Hm, I don't see that option in my config with LuckPerms-Sponge-4.1.68. Is that not in the version I'm using or do I need to manually add it?
Also is there currently any way to give a player a permission until he logs out?
You'll need to manually add it, the config doesn't update automatically.
It is possible, but not using commands.
You can do it via the Sponge API or the LP API using "transient" permissions.