Package dan200.computercraft.api.turtle
Interface TurtleCommand
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An interface for objects executing custom turtle commands, used with
ITurtleAccess.executeCommand(TurtleCommand)
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ITurtleAccess turtle) Will be called by the turtle on the main thread when it is time to execute the custom command.
-
Method Details
-
execute
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:
- A result, indicating whether this action succeeded or not.
- See Also:
-