public class BlockChange extends Object implements Change
This block change does not have an Extent assigned to it because
one will be taken from the passed UndoContext. If the context
does not have an extent (it is null), cryptic errors may occur.
| Constructor and Description |
|---|
BlockChange(BlockVector position,
BaseBlock previous,
BaseBlock current)
Create a new block change.
|
| Modifier and Type | Method and Description |
|---|---|
BaseBlock |
getCurrent()
Get the current block.
|
BlockVector |
getPosition()
Get the position.
|
BaseBlock |
getPrevious()
Get the previous block.
|
void |
redo(UndoContext context)
Perform an redo.
|
void |
undo(UndoContext context)
Perform an undo.
|
public BlockChange(BlockVector position, BaseBlock previous, BaseBlock current)
position - the positionprevious - the previous blockcurrent - the current blockpublic BlockVector getPosition()
public BaseBlock getPrevious()
public BaseBlock getCurrent()
public void undo(UndoContext context) throws WorldEditException
ChangeChangeSet.forwardIterator().undo in interface Changecontext - a context for undoWorldEditException - on an errorpublic void redo(UndoContext context) throws WorldEditException
ChangeChangeSet.backwardIterator() ()}.redo in interface Changecontext - a context for redoWorldEditException - on an errorCopyright © 2010-2014. All Rights Reserved.