Primary groups does not take context
Rakdos8 opened this issue · 23 comments
Hi there,
I ran into an issue (I think ?) or it behave weirdly. I've created 2 other groups: citizens
and staff-context
to keep the track as : default
> citizens
> staff-context
cf:
Then I try to /lp user bathman18 parent set staff-context server=skyblock
but it looks like LuckPerms consider that bathman18
lost his primary group and add default
back. But LuckPerms consider the context to be matching and print his prefix and so on.
Yet, his prefix does not apply in game.
I've run a verbose here:
Yet, if I remove the context server=skyblock
for bathman18
it looks like the group is applied correctly and prefix is attached as well
I thought I was running the same issue as #2270 but here is my config.yml
:
server: skyblock
include-global: true
include-global-world: true
apply-global-groups: true
apply-global-world-groups: true
primary-group-calculation: all-parents-by-weight # I've also tried parents-by-weight with no success
meta-value-selection-default: highest-number # I've tried inheritance with no success
The idea below that is to have one staff per server and not sharing permissions all around.
Thank you :)
PS: The 2nd example is strictly what we're looking for: https://github.com/lucko/LuckPerms/wiki/Advanced-Setup
But if I replace the server: skyblock
into server: global
from the config.yml
and define a static-context
:
{
"static-contexts": {
"server": "skyblock"
},
"default-contexts": {}
}
It looksl ike LuckPerms take, correctly, in account the primary group
The static-contexts
has no effect with server: skyblock
Here is the definition of prefixes for the group staff-context
You should not need to touch context.json at all. Just base your context on servername defined in server: servername
in LP config.yml for all backend servers.
You should not need to touch context.json at all. Just base your context on servername defined in
server: servername
in LP config.yml for all backend servers.
Exactly, but when I put the server: server-name
it does not take in account the true primary group so what am I missing ?
The prefix as well as the primary group is correct in lp user USER info
tho. Ensure you have vault plugin if you are displaying either using another plugin
The thing is the prefix as well as the primary group is the same regardless of the context. So I doubt its due to the context. Screenshot lp user USER meta info
I’d like to add that this also appears to affect prefixes. Using the trick with the static contexts fixed that too.
I’d like to add that this also appears to affect prefixes. Using the trick with the static contexts fixed that too.
Permissions are also affected if I remember well.
Also, if I define a static context and keep the server: server-name
in the config.yml
it won't work unless I set it to server: global
Will need to look into this in a bit more detail - very limited on time at the moment but I'll try get to it soon.
Have you tried the 5.1.107
version ?
Also, we might have changed some default config values such as :
primary-group-calculation: all-parents-by-weight
inheritance-traversal-algorithm: depth-first-pre-order
context-satisfy-mode: at-least-one-value-per-key
include-global: true
include-global-world: true
apply-global-groups: true
apply-global-world-groups: true
meta-value-selection-default: highest-number
These settings kind of broke my ranks and doesn't work still. I've reverted back to how they were. I guess I'm gonna have to wait till they fully fix it without having to change settings.