SteamWar/SpigotCore
Archiviert
13
0

Add SWCommand.Register.Registeres #104

Manuell gemergt
Lixfel hat 19 Commits von Registeres nach master 2021-05-12 20:35:45 +02:00 zusammengeführt
Nur Änderungen aus Commit 37d308346e werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -47,14 +47,8 @@ public abstract class SWCommand {
this.command = new Command(command, "", "/" + command, Arrays.asList(aliases)) {
@Override
public boolean execute(CommandSender sender, String alias, String[] args) {
// if (commandList.stream().filter(s -> s.invoke(sender, args)).findFirst().isPresent()) return false;
// if (commandHelpList.stream().filter(s -> s.invoke(sender, args)).findFirst().isPresent()) return false;
for (SubCommand subCommand : commandList) {
if (subCommand.invoke(sender, args)) return false;
}
for (SubCommand subCommand : commandHelpList) {
if (subCommand.invoke(sender, args)) return false;
}
if (commandList.stream().anyMatch(s -> s.invoke(sender, args))) return false;
commandHelpList.stream().anyMatch(s -> s.invoke(sender, args));
return false;
}