use of tools.docs.permissions.PermissionNodesGatherer in project AuthMeReloaded by AuthMe.
the class GeneratePluginYml method generatePermissions.
private Map<String, Object> generatePermissions() {
PermissionNodesGatherer gatherer = new PermissionNodesGatherer();
Map<String, String> permissionDescriptions = gatherer.gatherNodesWithJavaDoc();
permissionNodes = gatherer.getPermissionClasses().stream().map(clz -> clz.getEnumConstants()).flatMap((PermissionNode[] nodes) -> Arrays.stream(nodes)).collect(Collectors.toList());
Map<String, Object> descriptions = new TreeMap<>();
for (PermissionNode node : permissionNodes) {
descriptions.put(node.getNode(), buildPermissionEntry(node, permissionDescriptions.get(node.getNode())));
}
addWildcardPermissions(descriptions);
return descriptions;
}
Aggregations