Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Allow clean shutdown.
Rearrange command tables.
Dieser Commit ist enthalten in:
Ursprung
e767dd9888
Commit
e69aedf059
@ -103,6 +103,8 @@ public final class DocumentationPrinter {
|
||||
printer.writeAllCommands();
|
||||
writeOutput("commands.rst", printer.cmdOutput.toString());
|
||||
writeOutput("permissions.rst", printer.permsOutput.toString());
|
||||
|
||||
WorldEdit.getInstance().getSessionManager().unload();
|
||||
}
|
||||
|
||||
private static void writeOutput(String file, String output) throws IOException {
|
||||
@ -427,12 +429,14 @@ public final class DocumentationPrinter {
|
||||
String name = prefix + command.getName();
|
||||
String desc = serializer.serialize(command.getDescription());
|
||||
cmdOutput.append(".. csv-table::\n :widths: 8, 15\n\n");
|
||||
cmdOutput.append(" ").append(name).append(",\"").append(desc).append("\"\n");
|
||||
cmdOutput.append(" ").append(name).append(",");
|
||||
if (!command.getAliases().isEmpty()) {
|
||||
cmdOutput.append(" Aliases,\"").append(String.join(", ",
|
||||
cmdOutput.append("\"(or ").append(String.join(", ",
|
||||
command.getAliases().stream().map(a -> prefix + a).collect(Collectors.toSet())))
|
||||
.append("\"\n");
|
||||
.append(")\"");
|
||||
}
|
||||
cmdOutput.append("\n");
|
||||
cmdOutput.append(" Description,\"").append(desc).append("\"\n");
|
||||
if (command.getCondition() instanceof PermissionCondition) {
|
||||
cmdOutput.append(" Permissions,\"").append(String.join(", ", ((PermissionCondition) command.getCondition()).getPermissions())).append("\"\n");
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren