Add helper to get root index help topic (#415)

This commit is contained in:
Jason 2022-12-11 09:40:09 -07:00
parent 771e723224
commit 306a1def9a

View file

@ -112,6 +112,19 @@ public final class CommandHelpHandler<C> {
return this.queryHelp(null, query); return this.queryHelp(null, query);
} }
/**
* Query a root index help topic. This is the topic returned when querying {@link #queryHelp(Object, String)} with
* an empty string, or when there are no results.
*
* @param recipient The recipient of this help query to check permissions against (if Non-Null)
* @return index help topic
* @since 1.8.0
*/
@API(status = API.Status.STABLE, since = "1.8.0")
public @NonNull IndexHelpTopic<C> queryRootIndex(final @Nullable C recipient) {
return (IndexHelpTopic<C>) this.queryHelp(recipient, "");
}
/** /**
* Query for help * Query for help
* *