public interface HelpMap
The HelpMap tracks all help topics registered in a Bukkit server. When the server starts up or is reloaded, help is processed and topics are added in the following order:
- General topics are loaded from the help.yml
- Plugins load and optionally call
- Registered plugin commands are processed by
HelpTopicFactoryobjects to create topics
- Topic contents are amended as directed in help.yml
Modifier and Type Method Description
addTopic(HelpTopic topic)Adds a topic to the server's help index.
clear()Clears out the contents of the help index.
getHelpTopic(String topicName)Returns a help topic for a given topic name.
getHelpTopics()Returns a collection of all the registered help topics.
getIgnoredPlugins()Gets the list of plugins the server administrator has chosen to exclude from the help index.
registerHelpTopicFactory(Class<?> commandClass, HelpTopicFactory<?> factory)Associates a
HelpTopicFactoryobject with given command base class.
Returns a help topic for a given topic name.
topicName- The help topic name to look up.
HelpTopicobject matching the topic name or null if none can be found.
Returns a collection of all the registered help topics.
- All the registered help topics.
Adds a topic to the server's help index.
topic- The new help topic to add.
void clear()Clears out the contents of the help index. Normally called during server reload.
void registerHelpTopicFactory(@NotNull Class<?> commandClass, @NotNull HelpTopicFactory<?> factory)Associates a
HelpTopicFactoryobject with given command base class. Plugins typically call this method during
onLoad(). Once registered, the custom HelpTopicFactory will be used to create a custom
HelpTopicfor all commands deriving from the
commandClassbase class, or all commands deriving from
PluginCommandwho's executor derives from
commandClass- The class for which the custom HelpTopicFactory applies. Must derive from either
HelpTopicFactoryimplementation to associate with the
IllegalArgumentException- Thrown if
commandClassdoes not derive from a legal base class.
Gets the list of plugins the server administrator has chosen to exclude from the help index. Plugin authors who choose to directly extend
PluginCommandwill need to check this collection in their
HelpTopicFactoryimplementations to ensure they meet the server administrator's expectations.
- A list of plugins that should be excluded from the help index.