Class NexoBlockPlaceEvent
-
- All Implemented Interfaces:
-
org.bukkit.event.Cancellable
public class NexoBlockPlaceEvent extends Event implements Cancellable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
NexoBlockPlaceEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanic
mechanic
private final Block
block
private final Player
player
private final ItemStack
itemInHand
private final EquipmentSlot
hand
public final static NexoBlockPlaceEvent.Companion
Companion
-
Constructor Summary
Constructors Constructor Description NexoBlockPlaceEvent(CustomBlockMechanic mechanic, Block block, Player player, ItemStack itemInHand, EquipmentSlot hand)
-
Method Summary
Modifier and Type Method Description CustomBlockMechanic
getMechanic()
final Block
getBlock()
final Player
getPlayer()
final ItemStack
getItemInHand()
Gets the item in the player's hand when they placed the furniture. final EquipmentSlot
getHand()
Gets the hand used to place the furniture. Boolean
isCancelled()
Unit
setCancelled(Boolean cancel)
HandlerList
getHandlers()
-
-
Constructor Detail
-
NexoBlockPlaceEvent
NexoBlockPlaceEvent(CustomBlockMechanic mechanic, Block block, Player player, ItemStack itemInHand, EquipmentSlot hand)
-
-
Method Detail
-
getMechanic
CustomBlockMechanic getMechanic()
- Returns:
The CustomBlockMechanic of this block
-
getBlock
final Block getBlock()
- Returns:
The block that was broken
-
getPlayer
final Player getPlayer()
- Returns:
The player who broke this block
-
getItemInHand
final ItemStack getItemInHand()
Gets the item in the player's hand when they placed the furniture.
- Returns:
The ItemStack for the item in the player's hand when they placed the furniture
-
getHand
final EquipmentSlot getHand()
Gets the hand used to place the furniture.
- Returns:
The EquipmentSlot for the hand used to place the furniture
-
isCancelled
Boolean isCancelled()
-
setCancelled
Unit setCancelled(Boolean cancel)
-
getHandlers
HandlerList getHandlers()
-
-
-
-