public interface UndoQueue
| Modifier and Type | Method and Description |
|---|---|
void |
add(UndoList blocks) |
boolean |
commit() |
boolean |
commitNext() |
Collection<UndoList> |
getAll() |
UndoList |
getLast() |
UndoList |
getLast(org.bukkit.block.Block target) |
int |
getSize()
Get the current size of the queue.
|
boolean |
hasScheduled()
Check to see if there are any scheduled undo changes pending in this queue.
|
boolean |
isEmpty() |
void |
load(UndoData data)
Load the data in this undo queue.
|
void |
save(UndoData data)
Save the data in this undo queue.
|
UndoList |
undoRecent(org.bukkit.block.Block block,
int timeout)
Undo a recent construction performed by this Mage against the
given Block
|
UndoList |
undoRecent(int timeout)
Undo a recent construction performed by this Mage.
|
UndoList |
undoRecent(int timeout,
String spellKey) |
int |
undoScheduled()
Immediately undo any scheduled undo tasks.
|
void add(UndoList blocks)
@Nullable UndoList undoRecent(int timeout)
This will restore anything changed by the last-cast construction spell, and remove that construction from the Mage's UndoQueue.
It will skip undoing if the UndoList is older than the specified timeout.
timeout - The maximum age of the change@Nullable UndoList undoRecent(org.bukkit.block.Block block, int timeout)
This will restore anything changed by the last-cast construction spell by this Mage that targeted the specific Block, even if it was not the most recent Spell cast by that Mage.
It will skip undoing if the UndoList is older than the specified timeout.
block - The block to check for modifications.timeout - The maximum age of the changeint undoScheduled()
int getSize()
boolean isEmpty()
boolean commit()
boolean commitNext()
void save(UndoData data)
void load(UndoData data)
boolean hasScheduled()
Collection<UndoList> getAll()
Copyright © 2021 elMakers. All rights reserved.