Search in sources :

Example 1 with FixedDefaultsProcessor

use of me.lucko.luckperms.sponge.processors.FixedDefaultsProcessor in project LuckPerms by lucko.

the class SubjectCachedData method build.

@Override
public PermissionCalculator build(Contexts contexts, PermissionCalculatorMetadata metadata) {
    ImmutableList.Builder<PermissionProcessor> processors = ImmutableList.builder();
    processors.add(new MapProcessor());
    processors.add(new SpongeWildcardProcessor());
    processors.add(new WildcardProcessor());
    if (!this.subject.getParentCollection().isDefaultsCollection()) {
        processors.add(new FixedDefaultsProcessor(this.subject.getService(), contexts.getContexts().makeImmutable(), this.subject.getDefaults()));
    }
    return new PermissionCalculator(this.plugin, metadata, processors.build());
}
Also used : ImmutableList(com.google.common.collect.ImmutableList) FixedDefaultsProcessor(me.lucko.luckperms.sponge.processors.FixedDefaultsProcessor) SpongeWildcardProcessor(me.lucko.luckperms.sponge.processors.SpongeWildcardProcessor) PermissionCalculator(me.lucko.luckperms.common.calculators.PermissionCalculator) PermissionProcessor(me.lucko.luckperms.common.processors.PermissionProcessor) SpongeWildcardProcessor(me.lucko.luckperms.sponge.processors.SpongeWildcardProcessor) WildcardProcessor(me.lucko.luckperms.common.processors.WildcardProcessor) MapProcessor(me.lucko.luckperms.common.processors.MapProcessor)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 PermissionCalculator (me.lucko.luckperms.common.calculators.PermissionCalculator)1 MapProcessor (me.lucko.luckperms.common.processors.MapProcessor)1 PermissionProcessor (me.lucko.luckperms.common.processors.PermissionProcessor)1 WildcardProcessor (me.lucko.luckperms.common.processors.WildcardProcessor)1 FixedDefaultsProcessor (me.lucko.luckperms.sponge.processors.FixedDefaultsProcessor)1 SpongeWildcardProcessor (me.lucko.luckperms.sponge.processors.SpongeWildcardProcessor)1