Class ExplosiveToolBreakBlocksEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.thebusybiscuit.slimefun4.api.events.ExplosiveToolBreakBlocksEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ExplosiveToolBreakBlocksEvent extends org.bukkit.event.player.PlayerEvent implements org.bukkit.event.Cancellable
This Event is called when an ExplosiveTool is used to break blocks.
Author:
GallowsDove
See Also:
  • 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.player.PlayerEvent

    player
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExplosiveToolBreakBlocksEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block, List<org.bukkit.block.Block> blocks, org.bukkit.inventory.ItemStack item, ExplosiveTool explosiveTool)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.bukkit.block.Block>
    Gets the Block List of blocks destroyed in this event.
    Gets the ExplosiveTool which triggered this event
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.inventory.ItemStack
    Gets the ItemStack of the tool used to destroy this block
    org.bukkit.block.Block
    This returns the primary Block that was broken.
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.player.PlayerEvent

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • ExplosiveToolBreakBlocksEvent

      @ParametersAreNonnullByDefault public ExplosiveToolBreakBlocksEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block, List<org.bukkit.block.Block> blocks, org.bukkit.inventory.ItemStack item, ExplosiveTool explosiveTool)
  • Method Details

    • getPrimaryBlock

      @Nonnull public org.bukkit.block.Block getPrimaryBlock()
      This returns the primary Block that was broken. This Block triggered this Event and is not included in getAdditionalBlocks().
      Returns:
      The primary broken Block
    • getAdditionalBlocks

      @Nonnull public List<org.bukkit.block.Block> getAdditionalBlocks()
      Gets the Block List of blocks destroyed in this event.
      Returns:
      The broken blocks
    • getExplosiveTool

      @Nonnull public ExplosiveTool getExplosiveTool()
      Gets the ExplosiveTool which triggered this event
      Returns:
      the ExplosiveTool that was involved
    • getItemInHand

      @Nonnull public org.bukkit.inventory.ItemStack getItemInHand()
      Gets the ItemStack of the tool used to destroy this block
      Returns:
      The ItemStack in the hand of the Player
    • 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
    • getHandlerList

      @Nonnull public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

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