Optimize SWCommand.internalHelp
Dieser Commit ist enthalten in:
Ursprung
8706146317
Commit
02e7918e17
@ -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(" ");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren