Class DimensionsCommand
java.lang.Object
me.xxastaspastaxx.dimensions.commands.DimensionsCommand
- Direct Known Subclasses:
AddonCommand
,AdminHelpCommand
,AdminPermissionsCommand
,ClearCommand
,HelpCommand
,InfoCommand
,PermissionsCommand
,PortalCommand
,PortalsCommand
,ReloadCommand
,TestCommand
Parent class of commands that are being executed with /dim [command]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Execute the commandString[]
Get the aliasesgetArgs()
Get the argsGet commandGet the descriptionGet the permissionboolean
If its an admin commandboolean
isThisCommand(String contentRaw)
Check if the command run was this instance
-
Constructor Details
-
DimensionsCommand
public DimensionsCommand(String command, String args, String[] aliases, String description, String permission, boolean adminCommand)Constructor of DimensionsCommand- Parameters:
command
- the commandargs
- a string showing what arguments are required to execute the ocmmandaliases
- String array with aliases for the commanddescription
- Short description of the commandpermission
- empty string to allow the default permission or the permission to run the commandadminCommand
- true if this command should not be viewed by non-admin users
-
-
Method Details
-
isThisCommand
Check if the command run was this instance- Parameters:
contentRaw
- the command- Returns:
- true if its the command or an alias of the command
-
getCommand
Get command- Returns:
- the command
-
getArgs
Get the args- Returns:
- the args
-
getAliases
Get the aliases- Returns:
- the aliases
-
getDescription
Get the description- Returns:
- the description
-
getPermission
Get the permission- Returns:
- the permission
-
isAdminCommand
public boolean isAdminCommand()If its an admin command- Returns:
- true if its an admin command
-
execute
Execute the command- Parameters:
sender
- the sender of the commandargs
- the arguments used
-