mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 22:53:39 +01:00
Improved Javadoc in BentoBoxCommand interface
This commit is contained in:
parent
1155549e4c
commit
ceb88d9c7b
@ -13,26 +13,34 @@ import world.bentobox.bentobox.api.user.User;
|
||||
public interface BentoBoxCommand {
|
||||
|
||||
/**
|
||||
* Anything that needs to be set up for this command.
|
||||
* Register subcommands in this section.
|
||||
* Setups anything that is needed for this command.
|
||||
* <br/><br/>
|
||||
* It is recommended you do the following in this method:
|
||||
* <ul>
|
||||
* <li>Register any of the sub-commands of this command;</li>
|
||||
* <li>Define the permission required to use this command using {@link CompositeCommand#setPermission(String)};</li>
|
||||
* <li>Define whether this command can only be run by players or not using {@link CompositeCommand#setOnlyPlayer(boolean)};</li>
|
||||
* </ul>
|
||||
*/
|
||||
void setup();
|
||||
|
||||
/**
|
||||
* What will be executed when this command is run
|
||||
* @param user the User who is executing the command
|
||||
* @param label the label which has been used to execute the command (can be the command's label OR an alias)
|
||||
* @param args the command arguments
|
||||
* @return true or false - true if the command executed successfully
|
||||
* Defines what will be executed when this command is run.
|
||||
* @param user The {@link User} who is executing this command.
|
||||
* @param label The label which has been used to execute this command.
|
||||
* It can be {@link CompositeCommand#getLabel()} or an alias.
|
||||
* @param args The command arguments.
|
||||
* @return {@code true} if the command executed successfully, {@code false} otherwise.
|
||||
*/
|
||||
boolean execute(User user, String label, List<String> args);
|
||||
|
||||
/**
|
||||
* Tab Completer for CompositeCommands. Note that any registered sub-commands will be automatically
|
||||
* added to the list must not be manually added. Use this to add tab-complete for things like names.
|
||||
* @param user - the User
|
||||
* @param alias - alias for command
|
||||
* @param args - command arguments
|
||||
* Tab Completer for CompositeCommands.
|
||||
* Note that any registered sub-commands will be automatically added to the list.
|
||||
* Use this to add tab-complete for things like names.
|
||||
* @param user The {@link User} who is executing this command.
|
||||
* @param alias Alias for command
|
||||
* @param args Command arguments
|
||||
* @return List of strings that could be used to complete this command.
|
||||
*/
|
||||
default Optional<List<String>> tabComplete(User user, String alias, List<String> args) {
|
||||
|
Loading…
Reference in New Issue
Block a user