Pulling all pending Bukkit-JavaDoc changes

A special thanks goes to @aerouk for almost all of the changes found here.
This commit is contained in:
Wesley Wolfe
2013-12-15 01:07:43 -05:00
parent ad1f1c2c75
commit 8a1dbc38da
310 changed files with 4218 additions and 2904 deletions

View File

@@ -6,37 +6,62 @@ public interface CommandMap {
/**
* Registers all the commands belonging to a certain plugin.
* <p>
* Caller can use:-
* command.getName() to determine the label registered for this command
* command.getAliases() to determine the aliases which where registered
* <ul>
* <li>command.getName() to determine the label registered for this
* command
* <li>command.getAliases() to determine the aliases which where
* registered
* </ul>
*
* @param fallbackPrefix a prefix which is prepended to each command with a ':' one or more times to make the command unique
* @param fallbackPrefix a prefix which is prepended to each command with
* a ':' one or more times to make the command unique
* @param commands a list of commands to register
*/
public void registerAll(String fallbackPrefix, List<Command> commands);
/**
* Registers a command. Returns true on success; false if name is already taken and fallback had to be used.
* Registers a command. Returns true on success; false if name is already
* taken and fallback had to be used.
* <p>
* Caller can use:-
* command.getName() to determine the label registered for this command
* command.getAliases() to determine the aliases which where registered
* <ul>
* <li>command.getName() to determine the label registered for this
* command
* <li>command.getAliases() to determine the aliases which where
* registered
* </ul>
*
* @param label the label of the command, without the '/'-prefix.
* @param fallbackPrefix a prefix which is prepended to the command with a ':' one or more times to make the command unique
* @param fallbackPrefix a prefix which is prepended to the command with a
* ':' one or more times to make the command unique
* @param command the command to register
* @return true if command was registered with the passed in label, false otherwise, which indicates the fallbackPrefix was used one or more times
* @return true if command was registered with the passed in label, false
* otherwise, which indicates the fallbackPrefix was used one or more
* times
*/
public boolean register(String label, String fallbackPrefix, Command command);
/**
* Registers a command. Returns true on success; false if name is already taken and fallback had to be used.
* Registers a command. Returns true on success; false if name is already
* taken and fallback had to be used.
* <p>
* Caller can use:-
* command.getName() to determine the label registered for this command
* command.getAliases() to determine the aliases which where registered
* <ul>
* <li>command.getName() to determine the label registered for this
* command
* <li>command.getAliases() to determine the aliases which where
* registered
* </ul>
*
* @param fallbackPrefix a prefix which is prepended to the command with a ':' one or more times to make the command unique
* @param command the command to register, from which label is determined from the command name
* @return true if command was registered with the passed in label, false otherwise, which indicates the fallbackPrefix was used one or more times
* @param fallbackPrefix a prefix which is prepended to the command with a
* ':' one or more times to make the command unique
* @param command the command to register, from which label is determined
* from the command name
* @return true if command was registered with the passed in label, false
* otherwise, which indicates the fallbackPrefix was used one or more
* times
*/
public boolean register(String fallbackPrefix, Command command);
@@ -46,7 +71,8 @@ public interface CommandMap {
* @param sender The command's sender
* @param cmdLine command + arguments. Example: "/test abc 123"
* @return returns false if no target is found, true otherwise.
* @throws CommandException Thrown when the executor for the given command fails with an unhandled exception
* @throws CommandException Thrown when the executor for the given command
* fails with an unhandled exception
*/
public boolean dispatch(CommandSender sender, String cmdLine) throws CommandException;
@@ -59,18 +85,24 @@ public interface CommandMap {
* Gets the command registered to the specified name
*
* @param name Name of the command to retrieve
* @return Command with the specified name or null if a command with that label doesn't exist
* @return Command with the specified name or null if a command with that
* label doesn't exist
*/
public Command getCommand(String name);
/**
* Looks for the requested command and executes an appropriate tab-completer if found. This method will also tab-complete partial commands.
* Looks for the requested command and executes an appropriate
* tab-completer if found. This method will also tab-complete partial
* commands.
*
* @param sender The command's sender.
* @param cmdLine The entire command string to tab-complete, excluding initial slash.
* @return a list of possible tab-completions. This list may be immutable. Will be null if no matching command of which sender has permission.
* @throws CommandException Thrown when the tab-completer for the given command fails with an unhandled exception
* @param cmdLine The entire command string to tab-complete, excluding
* initial slash.
* @return a list of possible tab-completions. This list may be immutable.
* Will be null if no matching command of which sender has permission.
* @throws CommandException Thrown when the tab-completer for the given
* command fails with an unhandled exception
* @throws IllegalArgumentException if either sender or cmdLine are null
*/
public List<String> tabComplete(CommandSender sender, String cmdLine) throws IllegalArgumentException;