Package club.mher.cosmetics.api.commands
Interface ParentCommand
public interface ParentCommand
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubCommand(SubCommand subCommand) Add a sub-command.getName()Get parent command name.getSubCommand(String subCommand) Get a specific sub-command with its name.Get available sub-commands.booleanhasSubCommand(String name) Check if the sub-command exists.
-
Method Details
-
getName
String getName()Get parent command name.- Returns:
- The name of parent command.
-
getSubCommands
List<SubCommand> getSubCommands()Get available sub-commands.- Returns:
- The list of all sub-commands.
-
addSubCommand
Add a sub-command.- Parameters:
subCommand- The sub-command to add.
-
hasSubCommand
Check if the sub-command exists.- Parameters:
name- The name (SubCommand.getSubCommandName()) of the sub-command.- Returns:
- True if the sub-command exists, otherwise false.
-
getSubCommand
Get a specific sub-command with its name.- Parameters:
subCommand- The name (SubCommand.getSubCommandName()) of the sub-command.- Returns:
- The sub-command if exists, otherwise null.
-