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 class
NexoBlockInteractEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanic
mechanic
private final Player
player
private final ItemStack
itemInHand
private final EquipmentSlot
hand
private final Block
block
private final BlockFace
blockFace
private final Action
action
public final static NexoBlockInteractEvent.Companion
Companion
-
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 CustomBlockMechanic
getMechanic()
final Player
getPlayer()
final ItemStack
getItemInHand()
final EquipmentSlot
getHand()
final Block
getBlock()
final BlockFace
getBlockFace()
final Action
getAction()
Boolean
isCancelled()
Unit
setCancelled(Boolean cancel)
HandlerList
getHandlers()
-
-
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()
-
-
-
-