Class DelegateOperation
java.lang.Object
com.sk89q.worldedit.function.operation.DelegateOperation
- All Implemented Interfaces:
Operation
Executes a delegate operation, but returns to another operation upon
completing the delegate.
-
Field Summary
Fields inherited from interface com.sk89q.worldedit.function.operation.Operation
warnedDeprecatedClasses
-
Constructor Summary
ConstructorDescriptionDelegateOperation
(Operation original, Operation delegate) Create a new operation delegate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Abort the current task.Iterable
<com.sk89q.worldedit.util.formatting.text.Component> Gets an iterable of messages that describe the current status of the operation.resume
(RunContext run) Complete the next step.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.function.operation.Operation
addStatusMessages
-
Constructor Details
-
DelegateOperation
Create a new operation delegate.- Parameters:
original
- the operation to return todelegate
- the delegate operation to complete before returning
-
-
Method Details
-
resume
Description copied from interface:Operation
Complete the next step. If this method returns true, then the method may be called again in the future, or possibly never. If this method returns false, then this method should not be called again.- Specified by:
resume
in interfaceOperation
- Parameters:
run
- describes information about the current run- Returns:
- another operation to run that operation again, or null to stop
- Throws:
WorldEditException
- an error
-
cancel
public void cancel()Description copied from interface:Operation
Abort the current task. After the this method is called,Operation.resume(RunContext)
should not be called at any point in the future. This method should not be called after successful completion of the operation. This method must be called if the operation is interrupted before completion. -
getStatusMessages
Description copied from interface:Operation
Gets an iterable of messages that describe the current status of the operation.- Specified by:
getStatusMessages
in interfaceOperation
- Returns:
- The status messages
-