Package redempt.redlib.blockdata.events
Class DataBlockDestroyEvent
java.lang.Object
org.bukkit.event.Event
redempt.redlib.blockdata.events.DataBlockDestroyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class DataBlockDestroyEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Called when a DataBlock is destroyed
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionDataBlockDestroyEvent(DataBlock db, org.bukkit.event.Event parent, DataBlockDestroyEvent.DestroyCause cause) Creates a new BlockDataDestroyEvent -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels the event which caused this one - meaning the block will not be destroyedorg.bukkit.block.BlockgetBlock()getCause()static org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.event.EventbooleanvoidsetCancelled(boolean cancelled) Sets whether the data should be removed from the blockMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
DataBlockDestroyEvent
public DataBlockDestroyEvent(DataBlock db, org.bukkit.event.Event parent, DataBlockDestroyEvent.DestroyCause cause) Creates a new BlockDataDestroyEvent- Parameters:
db- The DataBlock that was destroyedparent- The Event which caused this onecause- The cause of the DataBlock being destroyed
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
setCancelled
public void setCancelled(boolean cancelled) Sets whether the data should be removed from the block- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancelled- True to cancel removal of data from the block, false otherwise
-
cancelParent
public void cancelParent()Cancels the event which caused this one - meaning the block will not be destroyed -
getCause
- Returns:
- The reason the DataBlock was destroyed
-
getParent
public org.bukkit.event.Event getParent()- Returns:
- The event which caused this one
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- Whether this event is cancelled
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getDataBlock
- Returns:
- The DataBlock being removed
-
getBlock
public org.bukkit.block.Block getBlock()- Returns:
- The Block being destroyed
-