LuckPerms

LuckPerms

41.4k Downloads

LuckPerms Api Static Context

MassiveLag opened this issue · 2 comments

commented

Description

Hello,
I was wondering if there a way to set custom static context via the api?
My servers are dynamic, and i am looking to set some information in context.json via the api.

commented

There is a class for static contexts in the API: net.luckperms.api.context.StaticContextCalculator

You'd register it in the same way as normal context calculators - it just extends from the ContextCalculator interface.

commented

You can’t set context.json. You can just register your own context calculator if you want to programmatically define your own custom context.