public List<String> getGroupPermsForWorld(String groupName, String world) {
if (!(permissionsAvailable())) {
return new ArrayList<String>(0);
}
ServicesManager sm = Bukkit.getServicesManager();
Permission p = sm.getRegistration(Permission.class).getProvider();
List<String> result = new ArrayList<String>();
for (org.bukkit.permissions.Permission perm : Bukkit.getPluginManager().getPermissions()) {
String permName = perm.getName();
if (p.groupHas(world, groupName, permName)) {
result.add(permName);
}
}
return result;
}