Interface SubCommand

All Known Implementing Classes:
AchievementsSubCommand, ClickerSubCommand, CookiesSubCommand, DevSubCommand, EventSubCommand, HelpSubCommand, NumbersSubCommand, PrestigeSubCommand, ReloadSubCommand

public interface SubCommand
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    execute(org.bukkit.command.CommandSender sender, String[] args)
    Execute the sub-command logic.
    Provides the usage description for the sub-command.
    boolean
    hasPermission(org.bukkit.command.CommandSender sender)
    Checks if a sender has permission to use the sub-command.
  • Method Details

    • execute

      boolean execute(org.bukkit.command.CommandSender sender, String[] args) throws CommandUsageException
      Execute the sub-command logic.
      Parameters:
      sender - Command sender
      args - Arguments passed to the command
      Returns:
      true if successful, false otherwise
      Throws:
      CommandUsageException - If the command usage is incorrect
    • getUsage

      String getUsage()
      Provides the usage description for the sub-command.
      Returns:
      A string representing command usage
    • hasPermission

      boolean hasPermission(org.bukkit.command.CommandSender sender)
      Checks if a sender has permission to use the sub-command.
      Parameters:
      sender - The command sender
      Returns:
      True if the sender has permission