Class InfoCommand
java.lang.Object
com.booksaw.betterTeams.commands.SubCommand
com.booksaw.betterTeams.commands.team.InfoCommand
This class handles the command /team info [team/player]
- Author:
- booksaw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHelp()
getInfoMessages
(Team team) int
return -1 if there is no capint
Used to get the minimum number of arguments which need to be parsed into this commandgetNode()
This method is called whenever the sub command is run, return the message (+ chat color if it should not be the default chat color)void
onTabComplete
(List<String> options, org.bukkit.command.CommandSender sender, String label, String[] args) Methods inherited from class com.booksaw.betterTeams.commands.SubCommand
addMetaStringList, addPlayerStringList, addTeamStringList, addTeamStringList, checkAsync, getArgMessage, getCommandAndArgMessage, getHelpMessage, needPlayer, runAsync
-
Constructor Details
-
InfoCommand
-
-
Method Details
-
getInfoMessages
-
onCommand
public CommandResponse onCommand(org.bukkit.command.CommandSender sender, String label, String[] args) Description copied from class:SubCommand
This method is called whenever the sub command is run, return the message (+ chat color if it should not be the default chat color)
The return value should be the value of the message to be sent to the user, for more complicated messaging systems return null
- Specified by:
onCommand
in classSubCommand
- Parameters:
sender
- the person who called the commandlabel
- the label of the initial command (useful for help files)args
- the arguments of the sub command (starting at args[0], as the sub command itself will be removed)- Returns:
- the message
-
getCommand
- Specified by:
getCommand
in classSubCommand
- Returns:
- the sub-command which this class handles
-
getMinimumArguments
public int getMinimumArguments()Description copied from class:SubCommand
Used to get the minimum number of arguments which need to be parsed into this command- Specified by:
getMinimumArguments
in classSubCommand
- Returns:
- the number of minimum arguments
-
getNode
- Specified by:
getNode
in classSubCommand
- Returns:
- the permission node for that sub command
-
getHelp
- Specified by:
getHelp
in classSubCommand
- Returns:
- the help information for that sub command (this does not include the arguments)
-
getArguments
- Specified by:
getArguments
in classSubCommand
- Returns:
- the arguments for that sub command ie '[name]'
-
getMaximumArguments
public int getMaximumArguments()Description copied from class:SubCommand
return -1 if there is no cap- Specified by:
getMaximumArguments
in classSubCommand
- Returns:
- the maximum number of arguments for the command
-
onTabComplete
public void onTabComplete(List<String> options, org.bukkit.command.CommandSender sender, String label, String[] args) - Specified by:
onTabComplete
in classSubCommand
-