Add config options to allow for finer control over how permissions are calculated, and set include-global to true on BungeeCord by default
This commit is contained in:
@@ -48,15 +48,24 @@ public class SpongeCalculatorFactory extends AbstractCalculatorFactory {
|
||||
@Override
|
||||
public PermissionCalculator build(Contexts contexts, User user) {
|
||||
ImmutableList.Builder<PermissionProcessor> processors = ImmutableList.builder();
|
||||
|
||||
processors.add(new MapProcessor());
|
||||
processors.add(new SpongeWildcardProcessor());
|
||||
|
||||
if (plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_IMPLICIT_WILDCARDS)) {
|
||||
processors.add(new SpongeWildcardProcessor());
|
||||
}
|
||||
|
||||
if (plugin.getConfiguration().get(ConfigKeys.APPLYING_REGEX)) {
|
||||
processors.add(new RegexProcessor());
|
||||
}
|
||||
|
||||
if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) {
|
||||
processors.add(new WildcardProcessor());
|
||||
}
|
||||
processors.add(new DefaultsProcessor(plugin.getService(), contexts.getContexts()));
|
||||
|
||||
if (plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_DEFAULT_SUBJECTS)) {
|
||||
processors.add(new DefaultsProcessor(plugin.getService(), contexts.getContexts()));
|
||||
}
|
||||
|
||||
return registerCalculator(new PermissionCalculator(plugin, user.getFriendlyName(), processors.build()));
|
||||
}
|
||||
|
||||
@@ -96,6 +96,20 @@ apply-regex=true
|
||||
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||
apply-shorthand=true
|
||||
|
||||
# If LuckPerms should resolve and apply permissions according to Sponge's implicit wildcard inheritance system.
|
||||
#
|
||||
# That being:
|
||||
# If a user has been granted "example", then the player should have also be automatically
|
||||
# granted "example.function", "example.another", "example.deeper.nesting", and so on.
|
||||
#
|
||||
# If this option is set to false, this system will not be applied.
|
||||
apply-sponge-implicit-wildcards=true
|
||||
|
||||
# If the plugin should apply Sponge default subject permissions.
|
||||
# Plugins can manipulate a set of default permissions granted to all users. If this option is set to false,
|
||||
# LuckPerms will ignore this data when considering if a player has a permission.
|
||||
apply-sponge-default-subjects=true
|
||||
|
||||
# Define special group weights for this server.
|
||||
# Default is just 0.
|
||||
group-weight {
|
||||
|
||||
Reference in New Issue
Block a user