Class BlockDropTrophyEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
com.github.crashdemons.miningtrophies.events.BlockDropTrophyEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class BlockDropTrophyEvent extends org.bukkit.event.block.BlockEvent implements org.bukkit.event.Cancellable
Defines a mining-trophy drop event that occurs when a player mines a block and receives a trophy.
Author:
crash
  • 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
    BlockDropTrophyEvent(org.bukkit.block.Block theBlock, org.bukkit.entity.Player miningPlayer, org.bukkit.inventory.ItemStack droppedTrophy)
    Constructs a mining-trophy drop event
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.inventory.ItemStack
    The trophy itemstack being dropped
    static org.bukkit.event.HandlerList
    Get a list of handlers for the event type
    org.bukkit.event.HandlerList
    Get a list of handlers for the event type
    org.bukkit.entity.Player
    The player that mine the block, causing the trophy event
    boolean
    Check whether the event is cancelled.
    void
    setCancelled(boolean state)
    Set whether the event should be cancelled.

    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

    • BlockDropTrophyEvent

      public BlockDropTrophyEvent(org.bukkit.block.Block theBlock, org.bukkit.entity.Player miningPlayer, org.bukkit.inventory.ItemStack droppedTrophy)
      Constructs a mining-trophy drop event
      Parameters:
      theBlock - the block that was mined to receive the trophy
      miningPlayer - the player that did the mining
      droppedTrophy - the trophy itemstack being dropped
  • Method Details

    • getDrop

      public org.bukkit.inventory.ItemStack getDrop()
      The trophy itemstack being dropped
      Returns:
      the trophy itemstack
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      The player that mine the block, causing the trophy event
      Returns:
      the mining player
    • setCancelled

      public void setCancelled(boolean state)
      Set whether the event should be cancelled.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      state - the state to change the cancellation to.
    • isCancelled

      public boolean isCancelled()
      Check whether the event is cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      the cancellation state of the event.
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Get a list of handlers for the event type
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      the list of handlers
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Get a list of handlers for the event type
      Returns:
      the list of handlers