Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@ -64,13 +64,14 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed on tab completion for this command, returning a list of options
|
||||
* the player can tab through.
|
||||
* Executed on tab completion for this command, returning a list of
|
||||
* options the player can tab through.
|
||||
*
|
||||
* @param sender Source object which is executing this command
|
||||
* @param alias the alias being used
|
||||
* @param args All arguments passed to the command, split via ' '
|
||||
* @return a list of tab-completions for the specified arguments. This will never be null. List may be immutable.
|
||||
* @return a list of tab-completions for the specified arguments. This
|
||||
* will never be null. List may be immutable.
|
||||
* @throws IllegalArgumentException if sender, alias, or args is null
|
||||
*/
|
||||
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||
@ -108,7 +109,8 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the permission required by users to be able to perform this command
|
||||
* Gets the permission required by users to be able to perform this
|
||||
* command
|
||||
*
|
||||
* @return Permission name, or null if none
|
||||
*/
|
||||
@ -117,7 +119,8 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the permission required by users to be able to perform this command
|
||||
* Sets the permission required by users to be able to perform this
|
||||
* command
|
||||
*
|
||||
* @param permission Permission name or null
|
||||
*/
|
||||
@ -126,9 +129,11 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the given {@link CommandSender} to see if they can perform this command.
|
||||
* Tests the given {@link CommandSender} to see if they can perform this
|
||||
* command.
|
||||
* <p>
|
||||
* If they do not have permission, they will be informed that they cannot do this.
|
||||
* If they do not have permission, they will be informed that they cannot
|
||||
* do this.
|
||||
*
|
||||
* @param target User to test
|
||||
* @return true if they can use it, otherwise false
|
||||
@ -150,7 +155,8 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the given {@link CommandSender} to see if they can perform this command.
|
||||
* Tests the given {@link CommandSender} to see if they can perform this
|
||||
* command.
|
||||
* <p>
|
||||
* No error is sent to the sender.
|
||||
*
|
||||
@ -181,12 +187,14 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the label of this command
|
||||
* If the command is currently registered the label change will only take effect after
|
||||
* its been reregistered e.g. after a /reload
|
||||
* Sets the label of this command.
|
||||
* <p>
|
||||
* If the command is currently registered the label change will only take
|
||||
* effect after its been re-registered e.g. after a /reload
|
||||
*
|
||||
* @param name The command's name
|
||||
* @return returns true if the name change happened instantly or false if it was scheduled for reregistration
|
||||
* @return returns true if the name change happened instantly or false if
|
||||
* it was scheduled for re-registration
|
||||
*/
|
||||
public boolean setLabel(String name) {
|
||||
this.nextLabel = name;
|
||||
@ -198,11 +206,12 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this command to a CommandMap
|
||||
* Registers this command to a CommandMap.
|
||||
* Once called it only allows changes the registered CommandMap
|
||||
*
|
||||
* @param commandMap the CommandMap to register this command to
|
||||
* @return true if the registration was successful (the current registered CommandMap was the passed CommandMap or null) false otherwise
|
||||
* @return true if the registration was successful (the current registered
|
||||
* CommandMap was the passed CommandMap or null) false otherwise
|
||||
*/
|
||||
public boolean register(CommandMap commandMap) {
|
||||
if (allowChangesFrom(commandMap)) {
|
||||
@ -214,10 +223,13 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this command from the passed CommandMap applying any outstanding changes
|
||||
* Unregisters this command from the passed CommandMap applying any
|
||||
* outstanding changes
|
||||
*
|
||||
* @param commandMap the CommandMap to unregister
|
||||
* @return true if the unregistration was successfull (the current registered CommandMap was the passed CommandMap or null) false otherwise
|
||||
* @return true if the unregistration was successfull (the current
|
||||
* registered CommandMap was the passed CommandMap or null) false
|
||||
* otherwise
|
||||
*/
|
||||
public boolean unregister(CommandMap commandMap) {
|
||||
if (allowChangesFrom(commandMap)) {
|
||||
@ -253,7 +265,8 @@ public abstract class Command {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a message to be displayed on a failed permission check for this command
|
||||
* Returns a message to be displayed on a failed permission check for this
|
||||
* command
|
||||
*
|
||||
* @return Permission check failed message
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user