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
  • 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 moved
      destination - The Block it is being moved to
      parent - 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

      public DataBlock 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 interface org.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 interface org.bukkit.event.Cancellable
      Returns:
      Whether the event is cancelled
    • getHandlers

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