Package dev.lone.itemsadder.api.Events
Class CustomBlockBreakEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
dev.lone.itemsadder.api.Events.CustomBlockBreakEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class CustomBlockBreakEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Event called when a custom block is broken.
-
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
ConstructorsConstructorDescriptionCustomBlockBreakEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block, Object internal) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.block.BlockgetBlock()Gets the Bukkit Block associated with this CustomBlock.org.bukkit.inventory.ItemStackGet a clone of the ItemStack of the custom block broken.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the Namespace and ID in the formatnamespace:idfor this CustomBlock.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
CustomBlockBreakEvent
public CustomBlockBreakEvent(org.bukkit.entity.Player player, org.bukkit.block.Block block, Object internal)
-
-
Method Details
-
isCancelled
public boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancelled- true if you wish to cancel this event
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList() -
getCustomBlockItem
public org.bukkit.inventory.ItemStack getCustomBlockItem()Get a clone of the ItemStack of the custom block broken.- Returns:
- the ItemStack for the
CustomBlock
-
getNamespacedID
Gets the Namespace and ID in the formatnamespace:idfor this CustomBlock.- Returns:
- String representing the namespace and ID of the CustomBlock.
-
getBlock
public org.bukkit.block.Block getBlock()Gets the Bukkit Block associated with this CustomBlock.- Returns:
- Bukkit Block associated with the CustomBlock.
-