Class CustomBlockPlaceEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
dev.lone.itemsadder.api.Events.CustomBlockPlaceEvent
All Implemented Interfaces:
Cancellable

public class CustomBlockPlaceEvent extends PlayerEvent implements Cancellable
Called when a player places an ItemsAdder custom block.
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()
    • getCustomBlockItem

      public ItemStack getCustomBlockItem()
      Gets the custom block item stack.
      Returns:
      a Bukkit item stack copy of the custom block.
    • getNamespacedID

      public String getNamespacedID()
      Gets the custom block namespaced id.
      Returns:
      the namespaced id.
    • getBlock

      public Block getBlock()
      Gets the placed block.
      Returns:
      the placed block.
    • isCanBuild

      public boolean isCanBuild()
      Gets whether Bukkit allows building at this location.
      Returns:
      true if building is allowed.
    • getPlacedAgainst

      public Block getPlacedAgainst()
      Gets the block this block was placed against.
      Returns:
      the block placed against.
    • getReplacedBlockState

      public BlockState getReplacedBlockState()
      Gets the block state replaced by this placement.
      Returns:
      the replaced block state.
    • getItemInHand

      public ItemStack getItemInHand()
      Gets the item used to place the custom block.
      Returns:
      the item in hand.