From 140e6b08cab9fe8c0ea02228fde5ef824355888f Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 11 Feb 2017 12:12:16 +0000 Subject: [PATCH] Apply regex perms before wildcards --- .../me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java | 6 +++--- .../me/lucko/luckperms/bungee/BungeeCalculatorFactory.java | 6 +++--- .../me/lucko/luckperms/sponge/SpongeCalculatorFactory.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java index 3e412d14..9de3884e 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java @@ -58,12 +58,12 @@ public class BukkitCalculatorFactory extends AbstractCalculatorFactory { LPPermissible permissible = Injector.getPermissible(uuid); return permissible == null ? null : permissible.getAttachmentPermissions(); })); - if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) { - processors.add(new WildcardProcessor()); - } 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(contexts.isOp(), plugin.getDefaultsProvider())); return registerCalculator(new PermissionCalculator(plugin, user.getName(), processors.build())); diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java index 3b554a52..7527213b 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java @@ -44,12 +44,12 @@ public class BungeeCalculatorFactory extends AbstractCalculatorFactory { public PermissionCalculator build(Contexts contexts, User user) { ImmutableList.Builder processors = ImmutableList.builder(); processors.add(new MapProcessor()); - if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) { - processors.add(new WildcardProcessor()); - } if (plugin.getConfiguration().get(ConfigKeys.APPLYING_REGEX)) { processors.add(new RegexProcessor()); } + if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) { + processors.add(new WildcardProcessor()); + } return registerCalculator(new PermissionCalculator(plugin, user.getName(), processors.build())); } diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java index fc792454..acc7502f 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java @@ -47,12 +47,12 @@ public class SpongeCalculatorFactory extends AbstractCalculatorFactory { ImmutableList.Builder processors = ImmutableList.builder(); processors.add(new MapProcessor()); processors.add(new SpongeWildcardProcessor()); - if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) { - processors.add(new WildcardProcessor()); - } 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())); return registerCalculator(new PermissionCalculator(plugin, user.getName(), processors.build()));