Interface Operation
- All Known Implementing Classes:
AboveVisitor
,BackwardsExtentBlockCopy
,BreadthFirstSearch
,ChangeSetExecutor
,DelegateOperation
,DFSRecursiveVisitor
,DFSVisitor
,DirectionalVisitor
,DownwardVisitor
,EntityVisitor
,FlatRegionVisitor
,ForwardExtentCopy
,LayerVisitor
,NonRisingVisitor
,OperationQueue
,RecursiveVisitor
,RegionVisitor
,SetBlockMap
,SetLocatedBlocks
public interface Operation
An task that may be split into multiple steps to be run sequentially
immediately or at a varying or fixed interval. Operations should attempt
to break apart tasks into smaller tasks that can be completed in quicker
successions.
-
Field Summary
Modifier and TypeFieldDescriptionThis is an internal field, and should not be touched. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addStatusMessages
(List<String> messages) Deprecated.Will be removed in WorldEdit 8.0 - use the Component variantvoid
cancel()
Abort the current task.default 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.
-
Field Details
-
warnedDeprecatedClasses
This is an internal field, and should not be touched.
-
-
Method Details
-
resume
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.- 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
void cancel()Abort the current task. After the this method is called,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. -
addStatusMessages
Deprecated.Will be removed in WorldEdit 8.0 - use the Component variantAdd messages to the provided list that describe the current status of the operation.- Parameters:
messages
- The list to add messages to
-
getStatusMessages
Gets an iterable of messages that describe the current status of the operation.- Returns:
- The status messages
-