Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.help.IndexHelpTopic Class Reference
Inheritance 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)
void amendCanSee (String amendedPermission)
String getFullText (CommandSender sender)
- Public Member Functions inherited from org.bukkit.help.HelpTopic
abstract boolean canSee (CommandSender player)
void amendCanSee (String amendedPermission)
String getName ()
String getShortText ()
String getFullText (CommandSender forWho)
void amendTopic (String amendedShortText, String amendedFullText)

Protected Member Functions

void setTopicsCollection (Collection< HelpTopic > topics)
String buildPreamble (CommandSender sender)
String buildIndexLine (CommandSender sender, HelpTopic topic)
- Protected Member Functions inherited from org.bukkit.help.HelpTopic
String applyAmendment (String baseText, String amendment)

Protected Attributes

String permission
String preamble
Collection< HelpTopicallTopics
- Protected Attributes inherited from org.bukkit.help.HelpTopic
String name
String shortText
String fullText
String amendedPermission

Detailed Description

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 19 of file IndexHelpTopic.java.

Member Function Documentation

String org.bukkit.help.IndexHelpTopic.buildIndexLine ( CommandSender  sender,
HelpTopic  topic 

Builds individual lines in the index topic. Override this method to change how index lines are rendered.

senderThe command sender requesting the index line.
topicThe topic to render into an index line.
The rendered index line.

Definition at line 103 of file IndexHelpTopic.java.

References org.bukkit.help.HelpTopic.getName(), org.bukkit.help.HelpTopic.getShortText(), org.bukkit.ChatColor.GOLD, and org.bukkit.ChatColor.WHITE.

103  {
104  StringBuilder line = new StringBuilder();
105  line.append(ChatColor.GOLD);
106  line.append(topic.getName());
107  line.append(": ");
108  line.append(ChatColor.WHITE);
109  line.append(topic.getShortText());
110  return line.toString();
111  }
String org.bukkit.help.IndexHelpTopic.buildPreamble ( CommandSender  sender)

Builds the topic preamble. Override this method to change how the index preamble looks.

senderThe command sender requesting the preamble.
The topic preamble.

Definition at line 91 of file IndexHelpTopic.java.

References org.bukkit.ChatColor.GRAY.

91  {
92  return ChatColor.GRAY + preamble;
93  }
void org.bukkit.help.IndexHelpTopic.setTopicsCollection ( Collection< HelpTopic topics)

Sets the contents of the internal allTopics collection.

topicsThe topics to set.

Definition at line 42 of file IndexHelpTopic.java.

42  {
43  this.allTopics = topics;
44  }

The documentation for this class was generated from the following file: