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
  • 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 destroyed
      parent - The Event which caused this one
      cause - 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:
      setCancelled in interface org.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:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      Whether this event is cancelled
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getDataBlock

      public DataBlock getDataBlock()
      Returns:
      The DataBlock being removed
    • getBlock

      public org.bukkit.block.Block getBlock()
      Returns:
      The Block being destroyed