Persisted user meta not loading properly on startup
Closed this issue ยท 1 comments
LP: 4.4.28
Paper 1.14.4
Here is my user file that im testing with
{
"uuid": "e035f345-cd86-32c4-b341-cb1c91fe2c9d",
"name": "KratosKnox",
"primaryGroup": "default",
"permissions": [
{
"permission": "griefdefender.admin.*",
"value": true
},
{
"permission": "griefdefender.user.*",
"value": true
}
],
"parents": [
{
"group": "default"
}
],
"meta": [
{
"key": "griefdefender.player-fly",
"value": "false",
"context": {
"gd_claim": "e5231357-eb88-4c23-b7ea-57ba80490064"
}
}
]
}
After server starts up, lookups for the meta above always return null unless re-applied.
Here is the code I am using to do a lookup for meta above
public String getOptionValue(GDPermissionHolder holder, Option option, Set<Context> contexts) {
ImmutableContextSet set = ImmutableContextSet.fromEntries(contexts);
Contexts context = Contexts.global().setContexts(set);
MetaData metaData = holder.getLuckPermsHolder().getCachedData().getMetaData(context);
return metaData.getMeta().get(option.getPermission());
}
I am uncertain if this also affects groups.