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 theBlock
List
of blocks destroyed in this event.Gets theExplosiveTool
which triggered this eventstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.inventory.ItemStack
Gets theItemStack
of the tool used to destroy this blockorg.bukkit.block.Block
This returns the primaryBlock
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
-
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 primaryBlock
that was broken. ThisBlock
triggered thisEvent
and is not included ingetAdditionalBlocks()
.- Returns:
- The primary broken
Block
-
getAdditionalBlocks
Gets theBlock
List
of blocks destroyed in this event.- Returns:
- The broken blocks
-
getExplosiveTool
Gets theExplosiveTool
which triggered this event- Returns:
- the
ExplosiveTool
that was involved
-
getItemInHand
@Nonnull public org.bukkit.inventory.ItemStack getItemInHand()Gets theItemStack
of the tool used to destroy this block- Returns:
- The
ItemStack
in the hand of thePlayer
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlerList
@Nonnull public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
@Nonnull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-