diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/DefaultsProvider.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/DefaultsProvider.java index e885fb08..f562e0de 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/DefaultsProvider.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/DefaultsProvider.java @@ -84,6 +84,7 @@ public class DefaultsProvider { @Getter private Map opDefaults = ImmutableMap.of(); private final DummyPermissible opDummy = new DummyPermissible(this::refreshOp); + @Getter private Map nonOpDefaults = ImmutableMap.of(); private final DummyPermissible nonOpDummy = new DummyPermissible(this::refreshNonOp); 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 63dc4b8f..4beb0606 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 @@ -92,7 +92,14 @@ public class LPPermissible extends PermissibleBase { } public void updateSubscriptions() { - Set ent = user.getUserData().getPermissionData(calculateContexts()).getImmutableBacking().keySet(); + Set ent = new HashSet<>(user.getUserData().getPermissionData(calculateContexts()).getImmutableBacking().keySet()); + + if (parent.isOp()) { + ent.addAll(plugin.getDefaultsProvider().getOpDefaults().keySet()); + } else { + ent.addAll(plugin.getDefaultsProvider().getNonOpDefaults().keySet()); + } + subscriptions.subscribe(ent); }