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
ConstructorsConstructorDescriptionBlockDropTrophyEvent(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 TypeMethodDescriptionorg.bukkit.inventory.ItemStackgetDrop()The trophy itemstack being droppedstatic org.bukkit.event.HandlerListGet a list of handlers for the event typeorg.bukkit.event.HandlerListGet a list of handlers for the event typeorg.bukkit.entity.PlayerThe player that mine the block, causing the trophy eventbooleanCheck whether the event is cancelled.voidsetCancelled(boolean state) Set whether the event should be cancelled.Methods inherited from class org.bukkit.event.block.BlockEvent
getBlockMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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 trophyminingPlayer- the player that did the miningdroppedTrophy- 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:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
state- the state to change the cancellation to.
-
isCancelled
public boolean isCancelled()Check whether the event is cancelled.- Specified by:
isCancelledin interfaceorg.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:
getHandlersin classorg.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
-