Package cloud.commandframework
Class CommandHelpHandler<C>
- java.lang.Object
-
- cloud.commandframework.CommandHelpHandler<C>
-
public final class CommandHelpHandler<C> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CommandHelpHandler.HelpTopic<C>
Something that can be returned as the result of a help querystatic class
CommandHelpHandler.IndexHelpTopic<C>
Index of available commandsstatic class
CommandHelpHandler.MultiHelpTopic<C>
Help topic with multiple semi-verbose command descriptionsstatic class
CommandHelpHandler.VerboseHelpEntry<C>
static class
CommandHelpHandler.VerboseHelpTopic<C>
Verbose information about a specificCommand
-
Method Summary
Modifier and Type Method Description @NonNull java.util.List<@NonNull CommandHelpHandler.VerboseHelpEntry<C>>
getAllCommands()
Get exact syntax hints for all commands@NonNull java.util.List<@NonNull java.lang.String>
getLongestSharedChains()
Get a list of the longest shared command chains of all commands.@NonNull CommandHelpHandler.HelpTopic<C>
queryHelp(@NonNull java.lang.String query)
Query for help@NonNull CommandHelpHandler.HelpTopic<C>
queryHelp(@Nullable C recipient, @NonNull java.lang.String query)
Query for help
-
-
-
Method Detail
-
getAllCommands
public @NonNull java.util.List<@NonNull CommandHelpHandler.VerboseHelpEntry<C>> getAllCommands()
Get exact syntax hints for all commands- Returns:
- Syntax hints for all registered commands, order in lexicographical order
-
getLongestSharedChains
public @NonNull java.util.List<@NonNull java.lang.String> getLongestSharedChains()
Get a list of the longest shared command chains of all commands. If there are two commands "foo bar 1" and "foo bar 2", this would then return "foo bar 1|2"- Returns:
- Longest shared command chains
-
queryHelp
public @NonNull CommandHelpHandler.HelpTopic<C> queryHelp(@NonNull java.lang.String query)
Query for help- Parameters:
query
- Query string- Returns:
- Help topic, will return an empty
CommandHelpHandler.IndexHelpTopic
if no results were found
-
queryHelp
public @NonNull CommandHelpHandler.HelpTopic<C> queryHelp(@Nullable C recipient, @NonNull java.lang.String query)
Query for help- Parameters:
recipient
- The recipient of this help query to check permissions against (if Non-Null)query
- Query string- Returns:
- Help topic, will return an empty
CommandHelpHandler.IndexHelpTopic
if no results were found
-
-