mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
ensure all bukkit permissions are registered on startup
This commit is contained in:
parent
b328fa74a7
commit
abddb265be
@ -158,14 +158,17 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
|
|||||||
defaultsProvider.refresh();
|
defaultsProvider.refresh();
|
||||||
childPermissionProvider.setup();
|
childPermissionProvider.setup();
|
||||||
|
|
||||||
getServer().getScheduler().runTaskAsynchronously(this, () -> {
|
Set<String> perms = new HashSet<>();
|
||||||
for (Map.Entry<String, Boolean> e : defaultsProvider.getOpDefaults().entrySet()) {
|
getServer().getPluginManager().getPermissions().forEach(p -> {
|
||||||
permissionVault.offer(e.getKey());
|
perms.add(p.getName());
|
||||||
}
|
perms.addAll(p.getChildren().keySet());
|
||||||
|
});
|
||||||
|
|
||||||
for (Map.Entry<String, Boolean> e : defaultsProvider.getNonOpDefaults().entrySet()) {
|
getServer().getScheduler().runTaskAsynchronously(this, () -> {
|
||||||
permissionVault.offer(e.getKey());
|
defaultsProvider.getOpDefaults().entrySet().stream().map(Map.Entry::getKey).forEach(e -> permissionVault.offer(e));
|
||||||
}
|
defaultsProvider.getNonOpDefaults().entrySet().stream().map(Map.Entry::getKey).forEach(e -> permissionVault.offer(e));
|
||||||
|
|
||||||
|
perms.forEach(p -> permissionVault.offer(p));
|
||||||
|
|
||||||
ImmutableMap<Map.Entry<String, Boolean>, ImmutableMap<String, Boolean>> permissions = childPermissionProvider.getPermissions();
|
ImmutableMap<Map.Entry<String, Boolean>, ImmutableMap<String, Boolean>> permissions = childPermissionProvider.getPermissions();
|
||||||
for (Map.Entry<Map.Entry<String, Boolean>, ImmutableMap<String, Boolean>> e : permissions.entrySet()) {
|
for (Map.Entry<Map.Entry<String, Boolean>, ImmutableMap<String, Boolean>> e : permissions.entrySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user