Package jss.commandapi
Class SubCommand
- java.lang.Object
-
- jss.commandapi.SubCommand
-
public abstract class SubCommand extends Object
Represents a subcommand that can be executed within a custom command.- Version:
- 0.0.1-alpha
- Author:
- jonagamerpro1234
-
-
Constructor Summary
Constructors Constructor Description SubCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract booleanallowConsole()Checks if the subcommand can be executed from the console.abstract StringdisabledMessage()Gets the disabled message for the subcommand.abstract booleanisEnabled()Checks if the subcommand is enabled.abstract Stringname()Gets the name of the subcommand.abstract booleanonCommand(org.bukkit.command.CommandSender sender, String[] args)Executes the subcommand.abstract Stringpermission()Gets the permission required to execute the subcommand.abstract booleanrequiresPermission()Checks if the subcommand requires permission to be executed.
-
-
-
Method Detail
-
name
public abstract String name()
Gets the name of the subcommand.- Returns:
- The name of the subcommand.
- Since:
- 0.0.1-alpha
-
permission
public abstract String permission()
Gets the permission required to execute the subcommand.- Returns:
- The permission required to execute the subcommand.
- Since:
- 0.0.1-alpha
-
requiresPermission
public abstract boolean requiresPermission()
Checks if the subcommand requires permission to be executed.- Returns:
trueif the subcommand requires permission,falseotherwise.- Since:
- 0.0.1-alpha
-
onCommand
public abstract boolean onCommand(org.bukkit.command.CommandSender sender, String[] args)Executes the subcommand.- Parameters:
sender- The CommandSender executing the subcommand.args- The arguments provided for the subcommand.- Returns:
trueif the subcommand was executed successfully,falseotherwise.- Since:
- 0.0.1-alpha
-
allowConsole
public abstract boolean allowConsole()
Checks if the subcommand can be executed from the console.- Returns:
trueif the subcommand can be executed from the console,falseotherwise.- Since:
- 0.0.1-alpha
-
isEnabled
public abstract boolean isEnabled()
Checks if the subcommand is enabled.- Returns:
trueif the subcommand is enabled,falseotherwise.- Since:
- 0.0.1-alpha
-
disabledMessage
public abstract String disabledMessage()
Gets the disabled message for the subcommand.- Returns:
- The disabled message for the subcommand.
- Since:
- 0.0.1-alpha
-
-