Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
This commit is contained in:
@@ -5,11 +5,11 @@ import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* HelpTopic implementations are displayed to the user when the user uses the /help command.
|
||||
*
|
||||
* <p>
|
||||
* Custom implementations of this class can work at two levels. A simple implementation only
|
||||
* needs to set the value of {@code name}, {@code shortText}, and {@code fullText} int the
|
||||
* constructor. This base class will take care of the rest.
|
||||
*
|
||||
* <p>
|
||||
* Complex implementations can be created by overriding the behavior of all the methods in
|
||||
* this class.
|
||||
*/
|
||||
@@ -32,6 +32,7 @@ public abstract class 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
|
||||
* {@link HelpTopic#canSee(org.bukkit.command.CommandSender)} function.
|
||||
*
|
||||
* @param amendedPermission The permission node the server administrator wishes to apply to this topic.
|
||||
*/
|
||||
public void amendCanSee(String amendedPermission) {
|
||||
@@ -40,6 +41,7 @@ public abstract class HelpTopic {
|
||||
|
||||
/**
|
||||
* Returns the name of this help topic.
|
||||
*
|
||||
* @return The topic name.
|
||||
*/
|
||||
public String getName() {
|
||||
@@ -48,6 +50,7 @@ public abstract class HelpTopic {
|
||||
|
||||
/**
|
||||
* Returns a brief description that will be displayed in the topic index.
|
||||
*
|
||||
* @return A brief topic description.
|
||||
*/
|
||||
public String getShortText() {
|
||||
@@ -88,7 +91,6 @@ public abstract class HelpTopic {
|
||||
*
|
||||
* @param baseText The existing text of the help topic.
|
||||
* @param amendment The amending text from the amendTopic() method.
|
||||
*
|
||||
* @return The application of the amending text to the existing text, according to the expected rules of
|
||||
* amendTopic().
|
||||
*/
|
||||
|
||||
@@ -7,13 +7,13 @@ import org.bukkit.command.Command;
|
||||
* common base class or have executors that inherit from a common base class. You can use a custom HelpTopic to change
|
||||
* the way all the commands in your plugin display in the help. If your plugin implements a complex permissions system,
|
||||
* a custom help topic may also be appropriate.
|
||||
*
|
||||
* <p>
|
||||
* To automatically bind your plugin's commands to your custom HelpTopic implementation, first make sure all your
|
||||
* commands or executors derive from a custom base class (it doesn't have to do anything). Next implement a custom
|
||||
* HelpTopicFactory that accepts your custom command base class and instantiates an instance of your custom HelpTopic
|
||||
* from it. Finally, register your HelpTopicFactory against your command base class using the {@link HelpMap#registerHelpTopicFactory(Class, HelpTopicFactory)}
|
||||
* method.
|
||||
*
|
||||
* <p>
|
||||
* As the help system iterates over all registered commands to make help topics, it first checks to see if there is a
|
||||
* HelpTopicFactory registered for the command's base class. If so, the factory is used to make a help topic rather
|
||||
* than a generic help topic. If no factory is found for the command's base class and the command derives from
|
||||
|
||||
Reference in New Issue
Block a user