Package redempt.redlib.blockdata.events
Class DataBlockMoveEvent
java.lang.Object
org.bukkit.event.Event
redempt.redlib.blockdata.events.DataBlockMoveEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class DataBlockMoveEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Called when a DataBlock is moved by pistons
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionDataBlockMoveEvent
(DataBlock db, org.bukkit.block.Block destination, org.bukkit.event.Event parent) Creates a DataBlockMoveEvent -
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels the blocks from being moved altogetherorg.bukkit.block.Block
getBlock()
org.bukkit.block.Block
static org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.event.Event
boolean
void
setCancelled
(boolean cancelled) Sets whether to move the data to the new BlockMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
DataBlockMoveEvent
public DataBlockMoveEvent(DataBlock db, org.bukkit.block.Block destination, org.bukkit.event.Event parent) Creates a DataBlockMoveEvent- Parameters:
db
- The DataBlock being moveddestination
- The Block it is being moved toparent
- The event which caused this one
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getParent
public org.bukkit.event.Event getParent()- Returns:
- The event which caused this one
-
getDestination
public org.bukkit.block.Block getDestination()- Returns:
- The Block the data is being moved to
-
getDataBlock
- Returns:
- The DataBlock being moved
-
getBlock
public org.bukkit.block.Block getBlock() -
setCancelled
public void setCancelled(boolean cancelled) Sets whether to move the data to the new Block- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
cancelled
- True to cancel the moving of data, false otherwise
-
cancelParent
public void cancelParent()Cancels the blocks from being moved altogether -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- Whether the event is cancelled
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-