Package com.booksaw.betterTeams.commands
Class HelpCommand
java.lang.Object
com.booksaw.betterTeams.commands.SubCommand
com.booksaw.betterTeams.commands.HelpCommand
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.chat.TextComponentcreateClickableHelpMessage(String label, String commandPath, String description) net.kyori.adventure.text.ComponentcreateClickableHelpMiniMessage(String label, String commandPath, String description) createHelpMessage(String label, String commandPath, String description) Used to create a formatted help message to explain what a command does to the uservoidfullyCustom(org.bukkit.command.CommandSender sender, String label) Used to send a fully custom help message which is stored in a filegetHelp()intreturn -1 if there is no capintUsed 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)voidonTabComplete(List<String> options, org.bukkit.command.CommandSender sender, String label, String[] args) static voidMethods inherited from class com.booksaw.betterTeams.commands.SubCommand
addMetaStringList, addPlayerStringList, addTeamStringList, addTeamStringList, checkAsync, getArgMessage, getCommandAndArgMessage, getHelpMessage, needPlayer, runAsync
-
Field Details
-
prefix
-
description
-
-
Constructor Details
-
HelpCommand
-
-
Method Details
-
setupHelp
public static void setupHelp() -
onCommand
public CommandResponse onCommand(org.bukkit.command.CommandSender sender, String label, String[] args) Description copied from class:SubCommandThis 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:
onCommandin 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
-
fullyCustom
Used to send a fully custom help message which is stored in a file- Parameters:
sender- the CommandSender that called the help messagelabel- the label for the message (the base command for example for /teamadmin it could be /teama as well)
-
createHelpMessage
Used to create a formatted help message to explain what a command does to the user- Parameters:
label- the base commandcommandPath- the rest of the command (i.e. help [param])description- the description of the command- Returns:
- the created message relating to that command
-
createClickableHelpMessage
-
createClickableHelpMiniMessage
-
getCommand
- Specified by:
getCommandin classSubCommand- Returns:
- the sub-command which this class handles
-
getNode
- Specified by:
getNodein classSubCommand- Returns:
- the permission node for that sub command
-
getHelp
- Specified by:
getHelpin classSubCommand- Returns:
- the help information for that sub command (this does not include the arguments)
-
getArguments
- Specified by:
getArgumentsin classSubCommand- Returns:
- the arguments for that sub command ie '[name]'
-
getMinimumArguments
public int getMinimumArguments()Description copied from class:SubCommandUsed to get the minimum number of arguments which need to be parsed into this command- Specified by:
getMinimumArgumentsin classSubCommand- Returns:
- the number of minimum arguments
-
onTabComplete
public void onTabComplete(List<String> options, org.bukkit.command.CommandSender sender, String label, String[] args) - Specified by:
onTabCompletein classSubCommand
-
getMaximumArguments
public int getMaximumArguments()Description copied from class:SubCommandreturn -1 if there is no cap- Specified by:
getMaximumArgumentsin classSubCommand- Returns:
- the maximum number of arguments for the command
-