Package dan200.computercraft.api.turtle
Class TurtleCommandResult
java.lang.Object
dan200.computercraft.api.turtle.TurtleCommandResult
Used to indicate the result of executing a turtle command.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic TurtleCommandResultfailure()Create a failed command result with no error message.static TurtleCommandResultCreate a failed command result with an error message.Get the error message of this command result.Object[]Get the resulting values of this command result.booleanDetermine whether the command executed successfully.static TurtleCommandResultsuccess()Create a successful command result with no result.static TurtleCommandResultCreate a successful command result with the given result values. 
- 
Method Details
- 
success
Create a successful command result with no result.- Returns:
 - A successful command result with no values.
 
 - 
success
Create a successful command result with the given result values.- Parameters:
 results- The results of executing this command.- Returns:
 - A successful command result with the given values.
 
 - 
failure
Create a failed command result with no error message.- Returns:
 - A failed command result with no message.
 
 - 
failure
Create a failed command result with an error message.- Parameters:
 errorMessage- The error message to provide.- Returns:
 - A failed command result with a message.
 
 - 
isSuccess
public boolean isSuccess()Determine whether the command executed successfully.- Returns:
 - If the command was successful.
 
 - 
getErrorMessage
Get the error message of this command result.- Returns:
 - The command's error message, or 
nullif it was a success. 
 - 
getResults
Get the resulting values of this command result.- Returns:
 - The command's result, or 
nullif it was a failure. 
 
 -