diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java index 5c416f422..03349cdde 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java @@ -158,14 +158,17 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { defaultsProvider.refresh(); childPermissionProvider.setup(); - getServer().getScheduler().runTaskAsynchronously(this, () -> { - for (Map.Entry e : defaultsProvider.getOpDefaults().entrySet()) { - permissionVault.offer(e.getKey()); - } + Set perms = new HashSet<>(); + getServer().getPluginManager().getPermissions().forEach(p -> { + perms.add(p.getName()); + perms.addAll(p.getChildren().keySet()); + }); - for (Map.Entry e : defaultsProvider.getNonOpDefaults().entrySet()) { - permissionVault.offer(e.getKey()); - } + getServer().getScheduler().runTaskAsynchronously(this, () -> { + 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, ImmutableMap> permissions = childPermissionProvider.getPermissions(); for (Map.Entry, ImmutableMap> e : permissions.entrySet()) {