diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java index 9c32bac8c..9900f3005 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java @@ -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 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(); }