mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +01:00
Fix bukkit defaults still being applied to subscriptions when disabled
This commit is contained in:
parent
5cd5186092
commit
b8e65c4f26
@ -82,8 +82,6 @@ public class LPPermissible extends PermissibleBase {
|
||||
this.parent = parent;
|
||||
this.plugin = plugin;
|
||||
this.subscriptions = new SubscriptionManager(this);
|
||||
|
||||
// recalculatePermissions();
|
||||
}
|
||||
|
||||
public void updateSubscriptionsAsync() {
|
||||
@ -106,10 +104,12 @@ public class LPPermissible extends PermissibleBase {
|
||||
|
||||
Set<String> ent = new HashSet<>(cache.getPermissionData(calculateContexts()).getImmutableBacking().keySet());
|
||||
|
||||
if (parent.isOp()) {
|
||||
ent.addAll(plugin.getDefaultsProvider().getOpDefaults().keySet());
|
||||
} else {
|
||||
ent.addAll(plugin.getDefaultsProvider().getNonOpDefaults().keySet());
|
||||
if (plugin.getConfiguration().get(ConfigKeys.APPLY_BUKKIT_DEFAULT_PERMISSIONS)) {
|
||||
if (parent.isOp()) {
|
||||
ent.addAll(plugin.getDefaultsProvider().getOpDefaults().keySet());
|
||||
} else {
|
||||
ent.addAll(plugin.getDefaultsProvider().getNonOpDefaults().keySet());
|
||||
}
|
||||
}
|
||||
|
||||
subscriptions.subscribe(ent);
|
||||
@ -171,7 +171,11 @@ public class LPPermissible extends PermissibleBase {
|
||||
return ts.asBoolean();
|
||||
}
|
||||
|
||||
return perm.getDefault().getValue(isOp());
|
||||
if (!plugin.getConfiguration().get(ConfigKeys.APPLY_BUKKIT_DEFAULT_PERMISSIONS)) {
|
||||
return Permission.DEFAULT_PERMISSION.getValue(isOp());
|
||||
} else {
|
||||
return perm.getDefault().getValue(isOp());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -291,9 +295,6 @@ public class LPPermissible extends PermissibleBase {
|
||||
Bukkit.getServer().getPluginManager().unsubscribeFromPermission(name, parent);
|
||||
}
|
||||
|
||||
// Bukkit.getServer().getPluginManager().unsubscribeFromDefaultPerms(false, parent);
|
||||
// Bukkit.getServer().getPluginManager().unsubscribeFromDefaultPerms(true, parent);
|
||||
|
||||
attachmentPermissions.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user