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 classNexoBlockPlaceEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final CustomBlockMechanicmechanicprivate final Blockblockprivate final Playerplayerprivate final ItemStackitemInHandprivate final EquipmentSlothandpublic final static NexoBlockPlaceEvent.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description NexoBlockPlaceEvent(CustomBlockMechanic mechanic, Block block, Player player, ItemStack itemInHand, EquipmentSlot hand)
-
Method Summary
Modifier and Type Method Description CustomBlockMechanicgetMechanic()final BlockgetBlock()final PlayergetPlayer()final ItemStackgetItemInHand()Gets the item in the player's hand when they placed the furniture. final EquipmentSlotgetHand()Gets the hand used to place the furniture. BooleanisCancelled()UnitsetCancelled(Boolean cancel)HandlerListgetHandlers()-
-
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()
-
-
-
-