public interface BlockData extends MaterialAndData
This also stores the block state using the MaterialAndData structure as a base, and can be used to restore a previously stored state.
In addition, BlockData instances can be linked to each other for layered undo queues that work even when undone out of order.
| Modifier and Type | Method and Description |
|---|---|
void |
addDamage(double damage) |
void |
commit() |
boolean |
containsAny(MaterialSet materials) |
boolean |
containsAny(Set<org.bukkit.Material> materials)
Deprecated.
|
org.bukkit.block.Block |
getBlock() |
org.bukkit.Chunk |
getChunk() |
double |
getDamage() |
long |
getId() |
org.bukkit.util.BlockVector |
getLocation() |
BlockData |
getNextState() |
org.bukkit.util.BlockVector |
getPosition() |
BlockData |
getPriorState() |
UndoList |
getUndoList() |
org.bukkit.World |
getWorld() |
org.bukkit.Location |
getWorldLocation() |
String |
getWorldName() |
boolean |
isDifferent() |
boolean |
isFake() |
void |
restore() |
void |
restore(boolean applyPhysics) |
void |
setFake(Collection<WeakReference<org.bukkit.entity.Player>> players) |
void |
setNextState(BlockData next) |
void |
setPriorState(BlockData prior) |
void |
setUndoList(UndoList undoList) |
boolean |
undo() |
boolean |
undo(boolean applyPhysics) |
boolean |
undo(ModifyType modifyType) |
void |
unlink() |
applyToItem, applyToItem, getBaseName, getBlockData, getCommandLine, getData, getItemStack, getItemStack, getKey, getMaterial, getModernBlockData, getName, getName, getTags, is, isDifferent, isDifferent, isDifferent, isValid, modify, modify, modify, setCommandLine, setCustomName, setData, setMaterial, setMaterial, setRawData, updateFrom, updateFromlong getId()
@Nullable org.bukkit.World getWorld()
String getWorldName()
@Nullable org.bukkit.block.Block getBlock()
@Nullable org.bukkit.Location getWorldLocation()
@Nullable org.bukkit.Chunk getChunk()
org.bukkit.util.BlockVector getPosition()
void restore()
void restore(boolean applyPhysics)
void commit()
boolean undo()
boolean undo(boolean applyPhysics)
boolean undo(ModifyType modifyType)
boolean isDifferent()
void unlink()
BlockData getNextState()
void setNextState(BlockData next)
BlockData getPriorState()
void setPriorState(BlockData prior)
void setUndoList(UndoList undoList)
org.bukkit.util.BlockVector getLocation()
@Deprecated boolean containsAny(Set<org.bukkit.Material> materials)
boolean containsAny(MaterialSet materials)
double getDamage()
void addDamage(double damage)
void setFake(Collection<WeakReference<org.bukkit.entity.Player>> players)
boolean isFake()
Copyright © 2021 elMakers. All rights reserved.