Class CustomBlockInteractEvent

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

public class CustomBlockInteractEvent extends PlayerEvent implements Cancellable
Called when a player interacts with 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.
    • getItem

      public ItemStack getItem()
      Gets the item used during the interaction.
      Returns:
      the item stack.
    • getAction

      public Action getAction()
      Gets the Bukkit interaction action.
      Returns:
      the interaction action.
    • getBlockClicked

      public Block getBlockClicked()
      Gets the clicked custom block.
      Returns:
      the clicked block.
    • getBlockFace

      public BlockFace getBlockFace()
      Gets the clicked block face.
      Returns:
      the clicked block face.
    • getHand

      public EquipmentSlot getHand()
      Gets the hand used for the interaction.
      Returns:
      the equipment slot.