mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-08 20:09:59 +01:00
Only apply DefaultsProcessor for users
This commit is contained in:
parent
46dc4e5104
commit
4e9b11f30a
@ -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));
|
||||
}
|
||||
|
||||
|
@ -66,16 +66,14 @@ 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)) {
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
return new PermissionCalculator(this.plugin, metadata, processors.build());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user