Package me.bimmr.bimmcore.commands
Class SuperCommand
- java.lang.Object
-
- me.bimmr.bimmcore.commands.SubCommand
-
- me.bimmr.bimmcore.commands.SuperCommand
-
public abstract class SuperCommand extends SubCommand
The command class - Used for commands such as /McInfected Admin
-
-
Constructor Summary
Constructors Constructor Description SuperCommand(java.lang.String name)
Instantiates a new Super command.
-
Method Summary
Modifier and Type Method Description void
addSubCommand(SubCommand subCommand)
Add a subcommandvoid
execute(org.bukkit.command.CommandSender sender, java.lang.String[] args)
abstract java.util.List<java.lang.String>
getAliases()
java.lang.String
getAllSubCommandExample()
Gets all sub command example.abstract java.lang.String
getCommandExample()
abstract java.lang.String
getCommandExampleHeader()
Gets command example header.abstract FancyMessage
getFancyMessage()
abstract java.lang.String
getInvalidSubCommandMessage()
Gets invalid sub command message.abstract java.lang.String
getPermission()
SubCommand
getSubCommand(java.lang.String command)
Get the SubCommand that matches the commandjava.util.List<java.lang.String>
getTabs(java.lang.String[] args)
void
removeSubCommand(SubCommand subCommand)
Remove a subcommandvoid
sendAllSubFancyMessage(org.bukkit.command.CommandSender sender)
Send all sub fancy message.-
Methods inherited from class me.bimmr.bimmcore.commands.SubCommand
getName, hasPermission
-
-
-
-
Method Detail
-
execute
public void execute(org.bukkit.command.CommandSender sender, java.lang.String[] args) throws org.bukkit.command.CommandException
- Specified by:
execute
in classSubCommand
- Throws:
org.bukkit.command.CommandException
-
getInvalidSubCommandMessage
public abstract java.lang.String getInvalidSubCommandMessage()
Gets invalid sub command message.- Returns:
- the invalid sub command message
-
getAliases
public abstract java.util.List<java.lang.String> getAliases()
- Specified by:
getAliases
in classSubCommand
-
getCommandExampleHeader
public abstract java.lang.String getCommandExampleHeader()
Gets command example header.- Returns:
- the command example header
-
getAllSubCommandExample
public java.lang.String getAllSubCommandExample()
Gets all sub command example.- Returns:
- the all sub command example
-
sendAllSubFancyMessage
public void sendAllSubFancyMessage(org.bukkit.command.CommandSender sender)
Send all sub fancy message.- Parameters:
sender
- the sender
-
getFancyMessage
public abstract FancyMessage getFancyMessage()
- Specified by:
getFancyMessage
in classSubCommand
-
getCommandExample
public abstract java.lang.String getCommandExample()
- Specified by:
getCommandExample
in classSubCommand
-
getPermission
public abstract java.lang.String getPermission()
- Specified by:
getPermission
in classSubCommand
-
getTabs
public java.util.List<java.lang.String> getTabs(java.lang.String[] args)
- Specified by:
getTabs
in classSubCommand
-
getSubCommand
public SubCommand getSubCommand(java.lang.String command)
Get the SubCommand that matches the command- Parameters:
command
- the command- Returns:
- sub command
-
addSubCommand
public void addSubCommand(SubCommand subCommand)
Add a subcommand- Parameters:
subCommand
- the sub command
-
removeSubCommand
public void removeSubCommand(SubCommand subCommand)
Remove a subcommand- Parameters:
subCommand
- the sub command
-
-