public class TurtleActionEvent extends TurtleEvent
| Constructor and Description |
|---|
TurtleActionEvent(ITurtleAccess turtle,
TurtleAction action) |
| Modifier and Type | Method and Description |
|---|---|
TurtleAction |
getAction() |
java.lang.String |
getFailureMessage()
Get the message with which this will fail.
|
void |
setCanceled(boolean cancel)
Deprecated.
Use
setCanceled(boolean, String) instead. |
void |
setCanceled(boolean cancel,
java.lang.String failureMessage)
Set the cancellation state of this action, setting a failure message if required.
|
getTurtlepublic TurtleActionEvent(@Nonnull
ITurtleAccess turtle,
@Nonnull
TurtleAction action)
public TurtleAction getAction()
@Deprecated public void setCanceled(boolean cancel)
setCanceled(boolean, String) instead.cancel is true, this action will not be carried out.setCanceled in class net.minecraftforge.fml.common.eventhandler.Eventcancel - The new canceled value.TurtleCommandResult.failure()public void setCanceled(boolean cancel,
@Nullable
java.lang.String failureMessage)
cancel is true, this action will not be carried out.cancel - The new canceled value.failureMessage - The message to return to the user explaining the failure.TurtleCommandResult.failure(String)@Nullable public java.lang.String getFailureMessage()
TurtleCommandResult.failure(),
setCanceled(boolean, String)