Package redempt.redlib.commandmanager
Class CommandCollection
java.lang.Object
redempt.redlib.commandmanager.CommandCollection
Represents a collection of commands which can be mass-registered. Can contain any amount of commands, including 0
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetByHookName(String hookName) Recurseively searches this CommandCollection for a command with a given hook namevoidRegister all commands in this CommandCollectionvoidRegister all commands in this CommandCollectionvoidRecursively searches this CommandCollection for a command by a given hook, then shows the help to the given sender 
- 
Constructor Details
- 
CommandCollection
 
 - 
 - 
Method Details
- 
register
Register all commands in this CommandCollection- Parameters:
 plugin- the plugin that owns the commandsprefix- The fallback prefix of the commandslisteners- The list of listener objects which contain hooks for the commands in this collection
 - 
register
Register all commands in this CommandCollection- Parameters:
 prefix- The fallback prefix of the commandslisteners- The list of listener objects which contain hooks for the commands in this collection
 - 
getCommands
- Returns:
 - The commands in this CommandCollection
 
 - 
showHelp
Recursively searches this CommandCollection for a command by a given hook, then shows the help to the given sender- Parameters:
 hookName- The hook name of the commandsender- The sender to be shown the help menu for this command- Throws:
 IllegalArgumentException- if no command by that hook name was found
 - 
getByHookName
Recurseively searches this CommandCollection for a command with a given hook name- Parameters:
 hookName- The hook name of the command- Returns:
 - The command in this CommandCollection by that hook name, or null if none found
 
 
 -