Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.help.GenericCommandHelpTopic Class Reference

Lacking an alternative, the help system will create instances of GenericCommandHelpTopic for each command in the server's CommandMap. More...

+ Inheritance diagram for org.bukkit.help.GenericCommandHelpTopic:
+ Collaboration diagram for org.bukkit.help.GenericCommandHelpTopic:

Public Member Functions

 GenericCommandHelpTopic (Command command)
 
boolean canSee (CommandSender sender)
 Determines if a Player is allowed to see this help topic.
 
- 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 Attributes

Command command
 
- Protected Attributes inherited from org.bukkit.help.HelpTopic
String name
 
String shortText
 
String fullText
 
String amendedPermission
 

Additional Inherited Members

- 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.
 

Detailed Description

Lacking an alternative, the help system will create instances of GenericCommandHelpTopic for each command in the server's CommandMap.

You can use this class as a base class for custom help topics, or as an example for how to write your own.

Definition at line 17 of file GenericCommandHelpTopic.java.

Constructor & Destructor Documentation

Member Function Documentation

boolean org.bukkit.help.GenericCommandHelpTopic.canSee ( CommandSender  player)
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.

Parameters
playerThe Player in question.
Returns
True of the Player can see this help topic, false otherwise.

Implements org.bukkit.help.HelpTopic.

Definition at line 63 of file GenericCommandHelpTopic.java.

References org.bukkit.help.HelpTopic.amendedPermission, org.bukkit.help.GenericCommandHelpTopic.command, org.bukkit.permissions.Permissible.hasPermission(), org.bukkit.command.Command.isRegistered(), and org.bukkit.command.Command.testPermissionSilent().

Member Data Documentation

Command org.bukkit.help.GenericCommandHelpTopic.command
protected

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