![]() |
Bukkit
1.4.7-R1.0
|
This help topic generates a list of other help topics. More...
Inheritance diagram for org.bukkit.help.IndexHelpTopic:
Collaboration diagram for org.bukkit.help.IndexHelpTopic:Public Member Functions | |
| IndexHelpTopic (String name, String shortText, String permission, Collection< HelpTopic > topics) | |
| IndexHelpTopic (String name, String shortText, String permission, Collection< HelpTopic > topics, String preamble) | |
| boolean | canSee (CommandSender sender) |
| Determines if a Player is allowed to see this help topic. | |
| void | amendCanSee (String amendedPermission) |
| String | getFullText (CommandSender sender) |
Public Member Functions inherited from org.bukkit.help.HelpTopic | |
| void | amendCanSee (String amendedPermission) |
| Allows the server administrator to override the permission required to see a help topic. | |
| String | getName () |
| Returns the name of this help topic. | |
| String | getShortText () |
| Returns a brief description that will be displayed in the topic index. | |
| String | getFullText (CommandSender forWho) |
| Returns the full description of this help topic that is displayed when the user requests this topic's details. | |
| void | amendTopic (String amendedShortText, String amendedFullText) |
| Allows the server admin (or another plugin) to add or replace the contents of a help topic. | |
Protected Member Functions | |
| void | setTopicsCollection (Collection< HelpTopic > topics) |
| Sets the contents of the internal allTopics collection. | |
| String | buildPreamble (CommandSender sender) |
| Builds the topic preamble. | |
| String | buildIndexLine (CommandSender sender, HelpTopic topic) |
| Builds individual lines in the index topic. | |
Protected Member Functions inherited from org.bukkit.help.HelpTopic | |
| String | applyAmendment (String baseText, String amendment) |
| Developers implementing their own custom HelpTopic implementations can use this utility method to ensure their implementations comply with the expected behavior of the HelpTopic#amendTopic(String, String) method. | |
Protected Attributes | |
| String | permission |
| String | preamble |
| Collection< HelpTopic > | allTopics |
Protected Attributes inherited from org.bukkit.help.HelpTopic | |
| String | name |
| String | shortText |
| String | fullText |
| String | amendedPermission |
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.
Definition at line 18 of file IndexHelpTopic.java.
| org.bukkit.help.IndexHelpTopic.IndexHelpTopic | ( | String | name, |
| String | shortText, | ||
| String | permission, | ||
| Collection< HelpTopic > | topics | ||
| ) |
Definition at line 24 of file IndexHelpTopic.java.
References org.bukkit.help.HelpTopic.name, org.bukkit.help.IndexHelpTopic.permission, and org.bukkit.help.HelpTopic.shortText.
| org.bukkit.help.IndexHelpTopic.IndexHelpTopic | ( | String | name, |
| String | shortText, | ||
| String | permission, | ||
| Collection< HelpTopic > | topics, | ||
| String | preamble | ||
| ) |
| void org.bukkit.help.IndexHelpTopic.amendCanSee | ( | String | amendedPermission | ) |
Definition at line 56 of file IndexHelpTopic.java.
References org.bukkit.help.HelpTopic.amendedPermission, and org.bukkit.help.IndexHelpTopic.permission.
|
protected |
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. |
Definition at line 100 of file IndexHelpTopic.java.
References org.bukkit.help.HelpTopic.getName(), org.bukkit.help.HelpTopic.getShortText(), org.bukkit.ChatColor.GOLD, and org.bukkit.ChatColor.WHITE.
Referenced by org.bukkit.help.IndexHelpTopic.getFullText().
|
protected |
Builds the topic preamble.
Override this method to change how the index preamble looks.
| sender | The command sender requesting the preamble. |
Definition at line 89 of file IndexHelpTopic.java.
References org.bukkit.ChatColor.GRAY, and org.bukkit.help.IndexHelpTopic.preamble.
Referenced by org.bukkit.help.IndexHelpTopic.getFullText().
|
virtual |
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.
| player | The Player in question. |
Implements org.bukkit.help.HelpTopic.
Definition at line 45 of file IndexHelpTopic.java.
References org.bukkit.permissions.Permissible.hasPermission(), and org.bukkit.help.IndexHelpTopic.permission.
| String org.bukkit.help.IndexHelpTopic.getFullText | ( | CommandSender | sender | ) |
Definition at line 60 of file IndexHelpTopic.java.
References org.bukkit.help.IndexHelpTopic.allTopics, org.bukkit.help.IndexHelpTopic.buildIndexLine(), org.bukkit.help.IndexHelpTopic.buildPreamble(), org.bukkit.util.ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH, and org.bukkit.help.IndexHelpTopic.preamble.
|
protected |
Sets the contents of the internal allTopics collection.
| topics | The topics to set. |
Definition at line 41 of file IndexHelpTopic.java.
References org.bukkit.help.IndexHelpTopic.allTopics.
Referenced by org.bukkit.help.IndexHelpTopic.IndexHelpTopic().
|
protected |
Definition at line 22 of file IndexHelpTopic.java.
Referenced by org.bukkit.help.IndexHelpTopic.getFullText(), and org.bukkit.help.IndexHelpTopic.setTopicsCollection().
|
protected |
Definition at line 20 of file IndexHelpTopic.java.
Referenced by org.bukkit.help.IndexHelpTopic.amendCanSee(), org.bukkit.help.IndexHelpTopic.canSee(), and org.bukkit.help.IndexHelpTopic.IndexHelpTopic().
|
protected |
Definition at line 21 of file IndexHelpTopic.java.
Referenced by org.bukkit.help.IndexHelpTopic.buildPreamble(), org.bukkit.help.IndexHelpTopic.getFullText(), and org.bukkit.help.IndexHelpTopic.IndexHelpTopic().