SteamWar/SpigotCore
Archiviert
13
0

Update SWCommand list

Dieser Commit ist enthalten in:
yoyosource 2021-03-30 10:10:21 +02:00
Ursprung 173361e1be
Commit e7beaa2b0f

Datei anzeigen

@ -34,8 +34,8 @@ import java.util.logging.Level;
public abstract class SWCommand { public abstract class SWCommand {
private final Command command; private final Command command;
private final LinkedList<SubCommand> commandSet = new LinkedList<>(); private final List<SubCommand> commandSet = new ArrayList<>();
private final LinkedList<SubCommand> commandHelpSet = new LinkedList<>(); private final List<SubCommand> commandHelpSet = new ArrayList<>();
private final Map<String, TypeMapper<?>> localTypeMapper = new HashMap<>(); private final Map<String, TypeMapper<?>> localTypeMapper = new HashMap<>();
protected SWCommand(String command) { protected SWCommand(String command) {
@ -102,7 +102,7 @@ public abstract class SWCommand {
Bukkit.getLogger().log(Level.WARNING, "The method '" + method.toString() + "' is lacking the varArgs parameters of type '" + String.class.getTypeName() + "' as last Argument"); Bukkit.getLogger().log(Level.WARNING, "The method '" + method.toString() + "' is lacking the varArgs parameters of type '" + String.class.getTypeName() + "' as last Argument");
return; return;
} }
commandHelpSet.addLast(new SubCommand(this, method, anno.value())); commandHelpSet.add(new SubCommand(this, method, anno.value()));
}); });
} }
for (Method method : getClass().getDeclaredMethods()) { for (Method method : getClass().getDeclaredMethods()) {
@ -129,7 +129,7 @@ public abstract class SWCommand {
return; return;
} }
} }
commandSet.addLast(new SubCommand(this, method, anno.value())); commandSet.add(new SubCommand(this, method, anno.value()));
}); });
} }
} }