dan200.computercraft.api.turtle

## Interface ITurtleCommand

    public interface ITurtleCommand

An interface for objects executing custom turtle commands, used with ITurtleAccess.issueCommand

See Also:
  `ITurtleAccess#issueCommand(ITurtleCommand)`

### Method Summary

Methods
`TurtleCommandResult` `execute(ITurtleAccess turtle)` Will be called by the turtle on the main thread when it is time to execute the custom command.

### Method Detail

#### execute

    TurtleCommandResult execute(ITurtleAccess turtle)

Will be called by the turtle on the main thread when it is time to execute the custom command. The handler should either perform the work of the command, and return success, or return failure with an error message to indicate the command cannot be executed at this time.

Parameters:
  `turtle` - access to the turtle for whom the command was issued
Returns:
  TurtleCommandResult.success() or TurtleCommandResult.failure( errorMessage )
See Also:
  `ITurtleAccess#issueCommand(ITurtleCommand)`, `TurtleCommandResult`