Class NoTeamSubCommand
java.lang.Object
com.booksaw.betterTeams.commands.SubCommand
com.booksaw.betterTeams.commands.presets.NoTeamSubCommand
- Direct Known Subclasses:
CreateCommand
,JoinCommand
This class can be extended for any sub commands which require players to be
in a team
- Author:
- booksaw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Used to check if the commandSender needs to be a player, defaults to falseThis method is called whenever the sub command is run, return the message (+ chat color if it should not be the default chat color)abstract CommandResponse
This method is run if the player is not in a teamMethods inherited from class com.booksaw.betterTeams.commands.SubCommand
addMetaStringList, addPlayerStringList, addTeamStringList, addTeamStringList, checkAsync, getArgMessage, getArguments, getCommand, getCommandAndArgMessage, getHelp, getHelpMessage, getMaximumArguments, getMinimumArguments, getNode, onTabComplete, runAsync
-
Constructor Details
-
NoTeamSubCommand
public NoTeamSubCommand()
-
-
Method Details
-
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
-
onCommand
public abstract CommandResponse onCommand(org.bukkit.entity.Player player, String label, String[] args) This method is run if the player is not in a team- Parameters:
player
- the player who is not in a teamlabel
- the label for the commandargs
- the arguments for the command- Returns:
- the message reference to send to the user
-
needPlayer
public boolean needPlayer()Description copied from class:SubCommand
Used to check if the commandSender needs to be a player, defaults to false- Overrides:
needPlayer
in classSubCommand
- Returns:
- if the commandSender needs to be a player
-