Interface CommandExecutor


public interface CommandExecutor
Represents a class which contains a single method for command execution.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onCommand​(org.cloudburstmc.api.command.CommandSender sender, Command command, String label, String[] args)
    Called when a command is executed.
  • Method Details

    • onCommand

      boolean onCommand(org.cloudburstmc.api.command.CommandSender sender, Command command, String label, String[] args)
      Called when a command is executed. If this method returns false, Cloudburst will send the command usage message for this command to the sender. If the command execution was successful, you should return true. If you want to test whether a command sender has the permission to execute a command, you can use Command.testPermissionSilent(org.cloudburstmc.api.command.CommandSender).
      Parameters:
      sender - The object that executed the command
      command - The command which was executed
      label - The alias used to execute the command
      args - Passed command arguments
      Returns:
      true if the command executed successfully