Class PlayerVeinMineEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.veinminer.api.event.PlayerVeinMineEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlayerVeinMineEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when VeinMiner is activated for a set of blocks.
  • Nested Class Summary

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

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

    Constructors 
    Constructor Description
    PlayerVeinMineEvent​(@NotNull org.bukkit.entity.Player who, @NotNull VeinBlock type, @Nullable org.bukkit.inventory.ItemStack item, @NotNull ToolCategory category, @NotNull Set<org.bukkit.block.Block> blocks, @NotNull VeinMiningPattern pattern)  
  • Method Summary

    Modifier and Type Method Description
    @NotNull VeinBlock getAffectedBlock()
    Get the block type affected by the vein mine.
    @NotNull Set<org.bukkit.block.Block> getBlocks()
    Get a set of all blocks destroyed by this vein mine.
    @NotNull ToolCategory getCategory()
    Get the tool used to initiate this vein mine.
    static org.bukkit.event.HandlerList getHandlerList()  
    org.bukkit.event.HandlerList getHandlers()  
    @Nullable org.bukkit.inventory.ItemStack getItem()
    Get the item used to vein mine (if any).
    @NotNull VeinMiningPattern getPattern()
    Get the vein mining pattern used for this vein mine.
    boolean isCancelled()  
    void setCancelled​(boolean cancel)  

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

    getPlayer

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • PlayerVeinMineEvent

      public PlayerVeinMineEvent​(@NotNull @NotNull org.bukkit.entity.Player who, @NotNull @NotNull VeinBlock type, @Nullable @Nullable org.bukkit.inventory.ItemStack item, @NotNull @NotNull ToolCategory category, @NotNull @NotNull Set<org.bukkit.block.Block> blocks, @NotNull @NotNull VeinMiningPattern pattern)
  • Method Details

    • getBlocks

      @NotNull public @NotNull Set<org.bukkit.block.Block> getBlocks()
      Get a set of all blocks destroyed by this vein mine. This set is mutable. Modifications will directly manipulate what blocks are and are not destroyed.
      Returns:
      the blocks to be affected by this event
    • getAffectedBlock

      @NotNull public @NotNull VeinBlock getAffectedBlock()
      Get the block type affected by the vein mine.
      Returns:
      the affected block
    • getItem

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getItem()
      Get the item used to vein mine (if any). Any changes made to the ItemStack returned by this method will not be reflected in the player's inventory.
      Returns:
      the item used to vein mine. null if none
    • getCategory

      @NotNull public @NotNull ToolCategory getCategory()
      Get the tool used to initiate this vein mine.
      Returns:
      the tool used
    • getPattern

      @NotNull public @NotNull VeinMiningPattern getPattern()
      Get the vein mining pattern used for this vein mine.
      Returns:
      the pattern used
    • 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
    • getHandlerList

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