diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/calculator/BukkitCalculatorFactory.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/calculator/BukkitCalculatorFactory.java index e898c5ba4..958caf0c1 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/calculator/BukkitCalculatorFactory.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/calculator/BukkitCalculatorFactory.java @@ -37,6 +37,7 @@ import me.lucko.luckperms.common.calculator.processor.PermissionProcessor; import me.lucko.luckperms.common.calculator.processor.RegexProcessor; import me.lucko.luckperms.common.calculator.processor.WildcardProcessor; import me.lucko.luckperms.common.config.ConfigKeys; +import me.lucko.luckperms.common.model.HolderType; import net.luckperms.api.query.QueryOptions; @@ -66,7 +67,7 @@ public class BukkitCalculatorFactory implements CalculatorFactory { } boolean op = queryOptions.option(BukkitContextManager.OP_OPTION).orElse(false); - if (this.plugin.getConfiguration().get(ConfigKeys.APPLY_BUKKIT_DEFAULT_PERMISSIONS)) { + if (metadata.getHolderType() == HolderType.USER && this.plugin.getConfiguration().get(ConfigKeys.APPLY_BUKKIT_DEFAULT_PERMISSIONS)) { processors.add(new DefaultsProcessor(this.plugin, op)); } diff --git a/nukkit/src/main/java/me/lucko/luckperms/nukkit/calculator/NukkitCalculatorFactory.java b/nukkit/src/main/java/me/lucko/luckperms/nukkit/calculator/NukkitCalculatorFactory.java index bf2380524..124208522 100644 --- a/nukkit/src/main/java/me/lucko/luckperms/nukkit/calculator/NukkitCalculatorFactory.java +++ b/nukkit/src/main/java/me/lucko/luckperms/nukkit/calculator/NukkitCalculatorFactory.java @@ -66,15 +66,13 @@ public class NukkitCalculatorFactory implements CalculatorFactory { processors.add(new WildcardProcessor()); } - if (metadata.getHolderType() == HolderType.USER) { - boolean op = queryOptions.option(NukkitContextManager.OP_OPTION).orElse(false); - if (this.plugin.getConfiguration().get(ConfigKeys.APPLY_NUKKIT_DEFAULT_PERMISSIONS)) { - processors.add(new DefaultsProcessor(this.plugin, op)); - } + boolean op = queryOptions.option(NukkitContextManager.OP_OPTION).orElse(false); + if (metadata.getHolderType() == HolderType.USER && this.plugin.getConfiguration().get(ConfigKeys.APPLY_NUKKIT_DEFAULT_PERMISSIONS)) { + processors.add(new DefaultsProcessor(this.plugin, op)); + } - if (op) { - processors.add(new OpProcessor()); - } + if (op) { + processors.add(new OpProcessor()); } return new PermissionCalculator(this.plugin, metadata, processors.build());