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
ConstructorsConstructorDescriptionExplosiveToolBreakBlocksEvent(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 TypeMethodDescriptionList<org.bukkit.block.Block> Gets theBlockListof blocks destroyed in this event.Gets theExplosiveToolwhich triggered this eventstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.inventory.ItemStackGets theItemStackof the tool used to destroy this blockorg.bukkit.block.BlockThis returns the primaryBlockthat was broken.booleanvoidsetCancelled(boolean cancel) Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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 primaryBlockthat was broken. ThisBlocktriggered thisEventand is not included ingetAdditionalBlocks().- Returns:
- The primary broken
Block
-
getAdditionalBlocks
Gets theBlockListof blocks destroyed in this event.- Returns:
- The broken blocks
-
getExplosiveTool
Gets theExplosiveToolwhich triggered this event- Returns:
- the
ExplosiveToolthat was involved
-
getItemInHand
@Nonnull public org.bukkit.inventory.ItemStack getItemInHand()Gets theItemStackof the tool used to destroy this block- Returns:
- The
ItemStackin the hand of thePlayer
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlerList
@Nonnull public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
@Nonnull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-