SteamWar/SpigotCore
Archiviert
13
0

Optimize SWCommand.internalHelp

Dieser Commit ist enthalten in:
yoyosource 2021-05-25 12:19:23 +02:00
Ursprung 8706146317
Commit 02e7918e17

Datei anzeigen

@ -36,7 +36,7 @@ import java.util.stream.Collectors;
public abstract class SWCommand {
private final List<String> help = new ArrayList<>();
private List<String> help = null;
private final Command command;
private final List<SubCommand> commandList = new ArrayList<>();
@ -226,7 +226,8 @@ public abstract class SWCommand {
@Register(help = true)
private void internalHelp(CommandSender sender, String... args) {
if (help.isEmpty()) {
if (help == null) {
help = new ArrayList<>();
commandList.forEach(subCommand -> {
StringBuilder st = new StringBuilder();
st.append("§8/§7").append(command.getName()).append(" ");