mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
mock command API
This commit is contained in:
@@ -13,7 +13,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents a command or subcommand, can be nested via getSubCommands.
|
||||
* Represents a command or subcommands, can be nested via getSubCommands.
|
||||
*/
|
||||
public abstract class Command implements CommandExecutor, TabCompleter {
|
||||
private final TerraPlugin main;
|
||||
@@ -29,7 +29,8 @@ public abstract class Command implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the command/subcommand
|
||||
* Gets the name of the command/subcommands
|
||||
*
|
||||
* @return Name of command
|
||||
*/
|
||||
public abstract String getName();
|
||||
@@ -47,7 +48,7 @@ public abstract class Command implements CommandExecutor, TabCompleter {
|
||||
* (if defined) will be sent to the player.
|
||||
*
|
||||
* @param sender Source of the command
|
||||
* @param command Command which was executed
|
||||
* @param command CommandTemplate which was executed
|
||||
* @param label Alias of the command which was used
|
||||
* @param args Passed command arguments
|
||||
* @return true if a valid command, otherwise false
|
||||
@@ -67,7 +68,7 @@ public abstract class Command implements CommandExecutor, TabCompleter {
|
||||
* (if defined) will be sent to the player.
|
||||
*
|
||||
* @param sender Source of the command
|
||||
* @param command Command which was executed
|
||||
* @param command CommandTemplate which was executed
|
||||
* @param label Alias of the command which was used
|
||||
* @param args Passed command arguments
|
||||
* @return true if a valid command, otherwise false
|
||||
|
||||
@@ -19,10 +19,10 @@ public abstract class PlayerCommand extends Command {
|
||||
* If false is returned, then the "usage" plugin.yml entry for this command
|
||||
* (if defined) will be sent to the player.
|
||||
*
|
||||
* @param sender Source of the command
|
||||
* @param command Command which was executed
|
||||
* @param label Alias of the command which was used
|
||||
* @param args Passed command arguments
|
||||
* @param sender Source of the command
|
||||
* @param command CommandTemplate which was executed
|
||||
* @param label Alias of the command which was used
|
||||
* @param args Passed command arguments
|
||||
* @return true if a valid command, otherwise false
|
||||
*/
|
||||
@Override
|
||||
@@ -34,6 +34,7 @@ public abstract class PlayerCommand extends Command {
|
||||
Player p = (Player) sender;
|
||||
return execute(p, command, label, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the given command, returning its success.
|
||||
* <br>
|
||||
@@ -41,7 +42,7 @@ public abstract class PlayerCommand extends Command {
|
||||
* (if defined) will be sent to the player.
|
||||
*
|
||||
* @param sender Player that executed command
|
||||
* @param command Command which was executed
|
||||
* @param command CommandTemplate which was executed
|
||||
* @param label Alias of the command which was used
|
||||
* @param args Passed command arguments
|
||||
* @return true if a valid command, otherwise false
|
||||
|
||||
Reference in New Issue
Block a user