Class CustomBlockPlaceEvent

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

public class CustomBlockPlaceEvent extends org.bukkit.event.block.BlockEvent implements org.bukkit.event.Cancellable
Called when a CustomBlock is placed by a Player
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class org.bukkit.event.block.BlockEvent

    block
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomBlockPlaceEvent(org.bukkit.block.Block block, org.bukkit.inventory.ItemStack item, CustomBlockType<?> type, org.bukkit.entity.Player player)
    Constructs a new CustomBlockPlaceEvent
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.inventory.ItemStack
     
    org.bukkit.entity.Player
     
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.block.BlockEvent

    getBlock

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomBlockPlaceEvent

      public CustomBlockPlaceEvent(org.bukkit.block.Block block, org.bukkit.inventory.ItemStack item, CustomBlockType<?> type, org.bukkit.entity.Player player)
      Constructs a new CustomBlockPlaceEvent
      Parameters:
      block - The block that was placed
      item - The item used to break the block
      type - The type of CustomBlock that is being placed
      player - The Player that placed the block
  • Method Details

    • getHandlerList

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

      public org.bukkit.entity.Player getPlayer()
      Returns:
      The Player that placed the CustomBlock
    • getItem

      public org.bukkit.inventory.ItemStack getItem()
      Returns:
      The item that was in the player's hand when this block was placed
    • getCustomBlockType

      public CustomBlockType<?> getCustomBlockType()
      Returns:
      The CustomBlockType that is being placed
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

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