Class NexoFurnitureInteractEvent
-
- All Implemented Interfaces:
-
org.bukkit.event.Cancellable
public final class NexoFurnitureInteractEvent extends Event implements Cancellable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
NexoFurnitureInteractEvent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final ItemStack
itemInHand
private Event.Result
canToggleLight
private Event.Result
canRotate
private Event.Result
canSit
private Event.Result
canSleep
private Event.Result
canOpenStorage
private Event.Result
canRunAction
private final FurnitureMechanic
mechanic
private final ItemDisplay
baseEntity
private final Player
player
private final EquipmentSlot
hand
private final Location
interactionPoint
private Event.Result
useFurniture
private Event.Result
useItemInHand
private final BlockFace
blockFace
public final static NexoFurnitureInteractEvent.Companion
Companion
-
Constructor Summary
Constructors Constructor Description NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture, Event.Result useItemInHand, BlockFace blockFace)
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture, Event.Result useItemInHand)
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture)
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint)
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand)
-
Method Summary
Modifier and Type Method Description final ItemStack
getItemInHand()
final Event.Result
getCanToggleLight()
final Unit
setCanToggleLight(Event.Result canToggleLight)
final Event.Result
getCanRotate()
final Unit
setCanRotate(Event.Result canRotate)
final Event.Result
getCanSit()
final Unit
setCanSit(Event.Result canSit)
final Event.Result
getCanSleep()
final Unit
setCanSleep(Event.Result canSleep)
final Event.Result
getCanOpenStorage()
final Unit
setCanOpenStorage(Event.Result canOpenStorage)
final Event.Result
getCanRunAction()
final Unit
setCanRunAction(Event.Result canRunAction)
final FurnitureMechanic
getMechanic()
final ItemDisplay
getBaseEntity()
final Player
getPlayer()
final EquipmentSlot
getHand()
final Location
getInteractionPoint()
final Event.Result
getUseFurniture()
final Unit
setUseFurniture(Event.Result useFurniture)
final Event.Result
getUseItemInHand()
final Unit
setUseItemInHand(Event.Result useItemInHand)
final BlockFace
getBlockFace()
Returns the clicked blockface for this interaction. Boolean
isCancelled()
Unit
setCancelled(Boolean cancel)
HandlerList
getHandlers()
-
-
Constructor Detail
-
NexoFurnitureInteractEvent
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture, Event.Result useItemInHand, BlockFace blockFace)
-
NexoFurnitureInteractEvent
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture, Event.Result useItemInHand)
-
NexoFurnitureInteractEvent
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint, Event.Result useFurniture)
-
NexoFurnitureInteractEvent
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand, Location interactionPoint)
-
NexoFurnitureInteractEvent
NexoFurnitureInteractEvent(FurnitureMechanic mechanic, ItemDisplay baseEntity, Player player, ItemStack itemInHand, EquipmentSlot hand)
-
-
Method Detail
-
getItemInHand
final ItemStack getItemInHand()
-
getCanToggleLight
final Event.Result getCanToggleLight()
-
setCanToggleLight
final Unit setCanToggleLight(Event.Result canToggleLight)
-
getCanRotate
final Event.Result getCanRotate()
-
setCanRotate
final Unit setCanRotate(Event.Result canRotate)
-
getCanSit
final Event.Result getCanSit()
-
getCanSleep
final Event.Result getCanSleep()
-
setCanSleep
final Unit setCanSleep(Event.Result canSleep)
-
getCanOpenStorage
final Event.Result getCanOpenStorage()
-
setCanOpenStorage
final Unit setCanOpenStorage(Event.Result canOpenStorage)
-
getCanRunAction
final Event.Result getCanRunAction()
-
setCanRunAction
final Unit setCanRunAction(Event.Result canRunAction)
-
getMechanic
final FurnitureMechanic getMechanic()
-
getBaseEntity
final ItemDisplay getBaseEntity()
-
getPlayer
final Player getPlayer()
-
getHand
final EquipmentSlot getHand()
-
getInteractionPoint
final Location getInteractionPoint()
-
getUseFurniture
final Event.Result getUseFurniture()
-
setUseFurniture
final Unit setUseFurniture(Event.Result useFurniture)
-
getUseItemInHand
final Event.Result getUseItemInHand()
-
setUseItemInHand
final Unit setUseItemInHand(Event.Result useItemInHand)
-
getBlockFace
final BlockFace getBlockFace()
Returns the clicked blockface for this interaction. Only applies if the interaction was with a barrier-hitbox block. If interaction-hitbox, this will be null.
-
isCancelled
Boolean isCancelled()
-
setCancelled
Unit setCancelled(Boolean cancel)
-
getHandlers
HandlerList getHandlers()
-
-
-
-