mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Subscribe to default permissions too
This commit is contained in:
parent
6501e5cf8d
commit
f1a1612f5d
@ -84,6 +84,7 @@ public class DefaultsProvider {
|
||||
@Getter
|
||||
private Map<String, Boolean> opDefaults = ImmutableMap.of();
|
||||
private final DummyPermissible opDummy = new DummyPermissible(this::refreshOp);
|
||||
|
||||
@Getter
|
||||
private Map<String, Boolean> nonOpDefaults = ImmutableMap.of();
|
||||
private final DummyPermissible nonOpDummy = new DummyPermissible(this::refreshNonOp);
|
||||
|
@ -92,7 +92,14 @@ public class LPPermissible extends PermissibleBase {
|
||||
}
|
||||
|
||||
public void updateSubscriptions() {
|
||||
Set<String> ent = user.getUserData().getPermissionData(calculateContexts()).getImmutableBacking().keySet();
|
||||
Set<String> 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user