Interface HelpMap


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:
  1. General topics are loaded from the help.yml
  2. Plugins load and optionally call addTopic()
  3. Registered plugin commands are processed by HelpTopicFactory objects to create topics
  4. Topic contents are amended as directed in help.yml
  • Method Details

    • getHelpTopic

      @Nullable HelpTopic getHelpTopic​(@NotNull String topicName)
      Returns a help topic for a given topic name.
      Parameters:
      topicName - The help topic name to look up.
      Returns:
      A HelpTopic object matching the topic name or null if none can be found.
    • getHelpTopics

      @NotNull Collection<HelpTopic> getHelpTopics()
      Returns a collection of all the registered help topics.
      Returns:
      All the registered help topics.
    • addTopic

      void addTopic​(@NotNull HelpTopic topic)
      Adds a topic to the server's help index.
      Parameters:
      topic - The new help topic to add.
    • clear

      void clear()
      Clears out the contents of the help index. Normally called during server reload.
    • registerHelpTopicFactory

      void registerHelpTopicFactory​(@NotNull Class<?> commandClass, @NotNull HelpTopicFactory<?> factory)
      Associates a HelpTopicFactory object with given command base class. Plugins typically call this method during onLoad(). Once registered, the custom HelpTopicFactory will be used to create a custom HelpTopic for all commands deriving from the commandClass base class, or all commands deriving from PluginCommand who's executor derives from commandClass base class.
      Parameters:
      commandClass - The class for which the custom HelpTopicFactory applies. Must derive from either Command or CommandExecutor.
      factory - The HelpTopicFactory implementation to associate with the commandClass.
      Throws:
      IllegalArgumentException - Thrown if commandClass does not derive from a legal base class.
    • getIgnoredPlugins

      @NotNull List<String> getIgnoredPlugins()
      Gets the list of plugins the server administrator has chosen to exclude from the help index. Plugin authors who choose to directly extend Command instead of PluginCommand will need to check this collection in their HelpTopicFactory implementations to ensure they meet the server administrator's expectations.
      Returns:
      A list of plugins that should be excluded from the help index.