SteamWar/SpigotCore
Archiviert
13
0

CommandFramework #107

Geschlossen
YoyoNow möchte 27 Commits von CommandFramework nach master mergen
2 geänderte Dateien mit 10 neuen und 2 gelöschten Zeilen
Nur Änderungen aus Commit 78985f15de werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -125,7 +125,15 @@ public abstract class SWCommand {
o2.varArgType != null ? Integer.MAX_VALUE : o2.arguments.length);
}
});
commandHelpList.sort(Comparator.comparingInt(o -> -o.subCommand.length));
commandHelpList.sort((o1, o2) -> {
int compare = Integer.compare(-o1.subCommand.length, -o2.subCommand.length);
if (compare != 0) {
return compare;
} else {
return Integer.compare(o1.method.getDeclaringClass() == SWCommand.class ? 0 : 1,
o2.method.getDeclaringClass() == SWCommand.class ? 0 : 1);
}
});
}
}

Datei anzeigen

@ -33,7 +33,7 @@ import static de.steamwar.command.SWCommandUtils.*;
class SubCommand {
private SWCommand swCommand;
private Method method;
Method method;
String description;
Parameter[] parameters;
String[] subCommand;