Class NexoBlockInteractEvent
-
- All Implemented Interfaces:
-
org.bukkit.event.Cancellable
public class NexoBlockInteractEvent extends Event implements Cancellable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNexoBlockInteractEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanicmechanicprivate final Playerplayerprivate final ItemStackitemInHandprivate final EquipmentSlothandprivate final Blockblockprivate final BlockFaceblockFaceprivate final Actionactionpublic final static NexoBlockInteractEvent.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description NexoBlockInteractEvent(CustomBlockMechanic mechanic, Player player, ItemStack itemInHand, EquipmentSlot hand, Block block, BlockFace blockFace, Action action)
-
Method Summary
Modifier and Type Method Description CustomBlockMechanicgetMechanic()final PlayergetPlayer()final ItemStackgetItemInHand()final EquipmentSlotgetHand()final BlockgetBlock()final BlockFacegetBlockFace()final ActiongetAction()BooleanisCancelled()UnitsetCancelled(Boolean cancel)HandlerListgetHandlers()-
-
Constructor Detail
-
NexoBlockInteractEvent
NexoBlockInteractEvent(CustomBlockMechanic mechanic, Player player, ItemStack itemInHand, EquipmentSlot hand, Block block, BlockFace blockFace, Action action)
-
-
Method Detail
-
getMechanic
CustomBlockMechanic getMechanic()
- Returns:
The NoteBlockMechanic of this block
-
getPlayer
final Player getPlayer()
- Returns:
The player who interacted with this block
-
getItemInHand
final ItemStack getItemInHand()
- Returns:
The item in hand when the player interacted with the note block
-
getHand
final EquipmentSlot getHand()
- Returns:
The hand used to perform interaction
-
getBlock
final Block getBlock()
- Returns:
The block that was interacted with
-
getBlockFace
final BlockFace getBlockFace()
- Returns:
The BlockFace that was clicked
-
getAction
final Action getAction()
- Returns:
The type of interaction
-
isCancelled
Boolean isCancelled()
-
setCancelled
Unit setCancelled(Boolean cancel)
-
getHandlers
HandlerList getHandlers()
-
-
-
-