Class NexoBlockDamageEvent
-
- All Implemented Interfaces:
-
org.bukkit.event.Cancellable
public class NexoBlockDamageEvent extends Event implements CancellableEvent fired right before a player damages a NoteBlock. If cancelled, the block will not be damaged.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNexoBlockDamageEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanicmechanicprivate final Blockblockprivate final Playerplayerpublic final static NexoBlockDamageEvent.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description NexoBlockDamageEvent(CustomBlockMechanic mechanic, Block block, Player player)
-
Method Summary
Modifier and Type Method Description CustomBlockMechanicgetMechanic()final BlockgetBlock()final PlayergetPlayer()BooleanisCancelled()UnitsetCancelled(Boolean cancel)HandlerListgetHandlers()-
-
Constructor Detail
-
NexoBlockDamageEvent
NexoBlockDamageEvent(CustomBlockMechanic mechanic, Block block, Player player)
-
-
Method Detail
-
getMechanic
CustomBlockMechanic getMechanic()
- Returns:
The CustomBlockMechanic
-
getBlock
final Block getBlock()
- Returns:
The block that was broken
-
getPlayer
final Player getPlayer()
- Returns:
The player who broke the note block
-
isCancelled
Boolean isCancelled()
-
setCancelled
Unit setCancelled(Boolean cancel)
-
getHandlers
HandlerList getHandlers()
-
-
-
-