程序包 org.bukkit.help

# 类 IndexHelpTopic

java.lang.Object
org.bukkit.help.HelpTopic
org.bukkit.help.IndexHelpTopic

public class IndexHelpTopic extends HelpTopic
This help topic generates a list of other help topics. This class is useful for adding your own index help topics. To enforce a particular order, use a sorted collection.

If a preamble is provided to the constructor, that text will be displayed before the first item in the index.

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `protected Collection<HelpTopic>`
  `allTopics`
  `protected String`
  `permission`
  `protected String`
  `preamble`

  ### 从类继承的字段 org.bukkit.help.HelpTopic

  `amendedPermission, fullText, name, shortText`

- ## 构造器概要

  构造器
  构造器
  说明
  `IndexHelpTopic(@NotNull String name, @Nullable String shortText, @Nullable String permission, @NotNull Collection<HelpTopic> topics)`
  `IndexHelpTopic(@NotNull String name, @Nullable String shortText, @Nullable String permission, @NotNull Collection<HelpTopic> topics, @Nullable String preamble)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `void`
  `amendCanSee(@Nullable String amendedPermission)`
  Allows the server administrator to override the permission required to see a help topic.
  `protected @NotNull String`
  `buildIndexLine(@NotNull CommandSender sender, @NotNull HelpTopic topic)`
  Builds individual lines in the index topic.
  `protected @NotNull String`
  `buildPreamble(@NotNull CommandSender sender)`
  Builds the topic preamble.
  `boolean`
  `canSee(@NotNull CommandSender sender)`
  Determines if a `Player` is allowed to see this help topic.
  `@NotNull String`
  `getFullText(@NotNull CommandSender sender)`
  Returns the full description of this help topic that is displayed when the user requests this topic's details.
  `protected void`
  `setTopicsCollection(@NotNull Collection<HelpTopic> topics)`
  Sets the contents of the internal allTopics collection.

  ### 从类继承的方法 org.bukkit.help.HelpTopic

  `amendTopic, applyAmendment, getName, getShortText`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 字段详细资料

  - ### permission

    protected String permission

  - ### preamble

    protected String preamble

  - ### allTopics

    protected Collection<HelpTopic> allTopics

- ## 构造器详细资料

  - ### IndexHelpTopic

    public IndexHelpTopic(@NotNull @NotNull String name, @Nullable @Nullable String shortText, @Nullable @Nullable String permission, @NotNull @NotNull Collection<HelpTopic> topics)

  - ### IndexHelpTopic

    public IndexHelpTopic(@NotNull @NotNull String name, @Nullable @Nullable String shortText, @Nullable @Nullable String permission, @NotNull @NotNull Collection<HelpTopic> topics, @Nullable @Nullable String preamble)

- ## 方法详细资料

  - ### setTopicsCollection

    protected void setTopicsCollection(@NotNull @NotNull Collection<HelpTopic> topics)
    Sets the contents of the internal allTopics collection.
    参数:
      `topics` - The topics to set.

  - ### canSee

    public boolean canSee(@NotNull @NotNull CommandSender sender)
    从类复制的说明: `HelpTopic`
    Determines if a `Player` is allowed to see this help topic.

    HelpTopic implementations should take server administrator wishes into account as set by the `HelpTopic.amendCanSee(String)` function.

    指定者:
      `canSee` 在类中 `HelpTopic`
    参数:
      `sender` - The Player in question.
    返回:
      True of the Player can see this help topic, false otherwise.

  - ### amendCanSee

    public void amendCanSee(@Nullable @Nullable String amendedPermission)
    从类复制的说明: `HelpTopic`
    Allows the server administrator to override the permission required to see a help topic.

    HelpTopic implementations should take this into account when determining topic visibility on the `HelpTopic.canSee(org.bukkit.command.CommandSender)` function.

    覆盖:
      `amendCanSee` 在类中 `HelpTopic`
    参数:
      `amendedPermission` - The permission node the server administrator wishes to apply to this topic.

  - ### getFullText

    @NotNull public @NotNull String getFullText(@NotNull @NotNull CommandSender sender)
    从类复制的说明: `HelpTopic`
    Returns the full description of this help topic that is displayed when the user requests this topic's details.

    The result will be paginated to properly fit the user's client.

    覆盖:
      `getFullText` 在类中 `HelpTopic`
    参数:
      `sender` - The player or console requesting the full text. Useful for further security trimming the command's full text based on sub-permissions in custom implementations.
    返回:
      A full topic description.

  - ### buildPreamble

    @NotNull protected @NotNull String buildPreamble(@NotNull @NotNull CommandSender sender)
    Builds the topic preamble. Override this method to change how the index preamble looks.
    参数:
      `sender` - The command sender requesting the preamble.
    返回:
      The topic preamble.

  - ### buildIndexLine

    @NotNull protected @NotNull String buildIndexLine(@NotNull @NotNull CommandSender sender, @NotNull @NotNull HelpTopic topic)
    Builds individual lines in the index topic. Override this method to change how index lines are rendered.
    参数:
      `sender` - The command sender requesting the index line.
      `topic` - The topic to render into an index line.
    返回:
      The rendered index line.