Interface SubCommand
- All Known Implementing Classes:
BypassStatusSubCommand,DataSubCommand,DebugSubCommand,DevSubCommand,GiveItemSubCommand,GracePeriodSubcommand,HeartsSubCommand,HelpSubCommand,RecipeSubCommand,ReloadSubCommand
public interface SubCommand
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(CommandSender sender, String[] args) Execute the sub-command logic.getUsage()Provides the usage description for the sub-command.booleanhasPermission(CommandSender sender) Checks if a sender has permission to use the sub-command.
-
Method Details
-
execute
Execute the sub-command logic.- Parameters:
sender- Command senderargs- Arguments passed to the command- Returns:
- true if successful, false otherwise
-
getUsage
String getUsage()Provides the usage description for the sub-command.- Returns:
- A string representing command usage
-
hasPermission
Checks if a sender has permission to use the sub-command.- Parameters:
sender- The command sender- Returns:
- True if the sender has permission
-