diff --git a/src/main/java/me/croabeast/command/SubCommand.java b/src/main/java/me/croabeast/command/SubCommand.java index bc5a3fd..f307c90 100644 --- a/src/main/java/me/croabeast/command/SubCommand.java +++ b/src/main/java/me/croabeast/command/SubCommand.java @@ -78,26 +78,20 @@ public class SubCommand implements BaseCommand { *
* * @param parent the parent command (must not be {@code null}). - * @param name the sub-command name, optionally including aliases separated by a semicolon. + * @param aliases the sub-command name, optionally including aliases separated by a semicolon. * @throws NullPointerException if the parent is {@code null} or if the name is blank. */ - public SubCommand(Command parent, String name) { + public SubCommand(Command parent, String name, String... aliases) { this.parent = Objects.requireNonNull(parent, "Parent cannot be null"); if (StringUtils.isBlank(name)) throw new NullPointerException("Name is empty"); - + // Split the provided name string by semicolons to extract primary name and aliases. - List