Class NexoBlockDamageEvent
-
- All Implemented Interfaces:
-
org.bukkit.event.Cancellable
public class NexoBlockDamageEvent extends Event implements Cancellable
Event 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 class
NexoBlockDamageEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanic
mechanic
private final Block
block
private final Player
player
public final static NexoBlockDamageEvent.Companion
Companion
-
Constructor Summary
Constructors Constructor Description NexoBlockDamageEvent(CustomBlockMechanic mechanic, Block block, Player player)
-
Method Summary
Modifier and Type Method Description CustomBlockMechanic
getMechanic()
final Block
getBlock()
final Player
getPlayer()
Boolean
isCancelled()
Unit
setCancelled(Boolean cancel)
HandlerList
getHandlers()
-
-
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()
-
-
-
-