use of me.lucko.luckperms.sponge.processors.SpongeWildcardProcessor in project LuckPerms by lucko.
the class SpongeCalculatorFactory method build.
@Override
public PermissionCalculator build(Contexts contexts, PermissionCalculatorMetadata metadata) {
ImmutableList.Builder<PermissionProcessor> processors = ImmutableList.builder();
processors.add(new MapProcessor());
if (this.plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_IMPLICIT_WILDCARDS)) {
processors.add(new SpongeWildcardProcessor());
}
if (this.plugin.getConfiguration().get(ConfigKeys.APPLYING_REGEX)) {
processors.add(new RegexProcessor());
}
if (this.plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) {
processors.add(new WildcardProcessor());
}
if (this.plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_DEFAULT_SUBJECTS)) {
if (metadata.getHolderType().isUser()) {
processors.add(new UserDefaultsProcessor(this.plugin.getService(), contexts.getContexts().makeImmutable()));
} else if (metadata.getHolderType().isGroup()) {
processors.add(new GroupDefaultsProcessor(this.plugin.getService(), contexts.getContexts().makeImmutable()));
}
}
return registerCalculator(new PermissionCalculator(this.plugin, metadata, processors.build()));
}
use of me.lucko.luckperms.sponge.processors.SpongeWildcardProcessor 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());
}
Aggregations