Class SubCommand
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.commands.SubCommand
- Direct Known Subclasses:
DebugCommand
This class represents a
SubCommand, it is a Command that starts with
/sf ... and is followed by the name of this SubCommand.- Author:
- TheBusyBiscuit
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubCommand(Slimefun plugin, SlimefunCommand cmd, String name, boolean hidden) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDescription(CommandSender sender) This returns a description for thisSubCommand.final StringgetName()This returns the name of thisSubCommand, the name is equivalent to the first argument given to the actual command.final booleanisHidden()This method returns whether thisSubCommandis hidden from theHelpCommand.abstract voidonExecute(CommandSender sender, String[] args) protected voidrecordUsage(Map<SubCommand, Integer> commandUsage)
-
Field Details
-
plugin
-
cmd
-
-
Constructor Details
-
SubCommand
@ParametersAreNonnullByDefault protected SubCommand(Slimefun plugin, SlimefunCommand cmd, String name, boolean hidden)
-
-
Method Details
-
getName
This returns the name of thisSubCommand, the name is equivalent to the first argument given to the actual command.- Returns:
- The name of this
SubCommand
-
isHidden
public final boolean isHidden()This method returns whether thisSubCommandis hidden from theHelpCommand.- Returns:
- Whether to hide this
SubCommand
-
recordUsage
-
onExecute
-
getDescription
-
getDescription
This returns a description for thisSubCommand. If the givenCommandSenderis aPlayer, the description will be localized with the currently selectedLanguageof thatPlayer.- Parameters:
sender- TheCommandSenderwho requested the description- Returns:
- A possibly localized description of this
SubCommand
-