Class DataBlockDestroyEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
redempt.redlib.blockdata.events.DataBlockDestroyEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DataBlockDestroyEvent extends org.bukkit.event.block.BlockEvent implements org.bukkit.event.Cancellable
Called when a DataBlock is destroyed by something other than a player
  • Constructor Details

    • DataBlockDestroyEvent

      public DataBlockDestroyEvent(DataBlock db, org.bukkit.entity.Player player, DataBlockDestroyEvent.DestroyCause cause, org.bukkit.event.Event parent)
      Construct a DataBlockDestroyEvent
      Parameters:
      db - The DataBlock that was destroyed
      player - The player that broke the block, or null
      cause - Why it was destroyed
      parent - The event that caused this event
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getParent

      public org.bukkit.event.Event getParent()
      Returns:
      The event that caused this one
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns:
      The Player who broke the DataBlock, or null if it was not a Player.
    • getDataBlock

      public DataBlock getDataBlock()
      Returns:
      The DataBlock that was destroyed
    • getCause

      Returns:
      The DestroyCause representing why the DataBlock was destroyed
    • getHandlers

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

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      Whether this event is cancelled
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - true if you wish to cancel this event