Re-add regex permissions & actually take note of the config options

This commit is contained in:
Luck committed 2016-09-19 21:00:23 +01:00
1 parent cff1b8a411
commit b1e34b55f8
8 files changed
+63 -25

No files matched your search

@@ -54,10 +54,15 @@ public class LuckPermsUserSubject extends LuckPermsSubject {
super(user, service);
this.user = user;
List<PermissionProcessor> processors = new ArrayList<>(4);
List<PermissionProcessor> processors = new ArrayList<>(5);
processors.add(new PermissionCalculator.MapProcessor(permissionCache));
processors.add(new SpongeWildcardProcessor(permissionCache));
processors.add(new PermissionCalculator.WildcardProcessor(permissionCache));
if (service.getPlugin().getConfiguration().getApplyWildcards()) {
processors.add(new SpongeWildcardProcessor(permissionCache));
processors.add(new PermissionCalculator.WildcardProcessor(permissionCache));
}
if (service.getPlugin().getConfiguration().getApplyRegex()) {
processors.add(new PermissionCalculator.RegexProcessor(permissionCache));
}
processors.add(new SpongeDefaultsProcessor(service));
calculator = new PermissionCalculator(service.getPlugin(), user.getName(), service.getPlugin().getConfiguration().getDebugPermissionChecks(), processors);