Search in sources :

Example 1 with ContextSetFactory

use of net.luckperms.api.context.ContextSetFactory in project AuthMeReloaded by AuthMe.

the class LuckPermsHandler method buildGroupNode.

@NotNull
private InheritanceNode buildGroupNode(UserGroup group) {
    ContextSetFactory contextSetFactory = luckPerms.getContextManager().getContextSetFactory();
    InheritanceNode.Builder builder = InheritanceNode.builder(group.getGroupName());
    if (group.getContextMap() != null) {
        group.getContextMap().forEach((k, v) -> builder.withContext((contextSetFactory.immutableOf(k, v))));
    }
    return builder.build();
}
Also used : InheritanceNode(net.luckperms.api.node.types.InheritanceNode) ContextSetFactory(net.luckperms.api.context.ContextSetFactory) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ContextSetFactory (net.luckperms.api.context.ContextSetFactory)1 InheritanceNode (net.luckperms.api.node.types.InheritanceNode)1 NotNull (org.jetbrains.annotations.NotNull)1