Skip to content

Class endstone::PlayerArmorStandManipulateEvent

ClassList > endstone > PlayerArmorStandManipulateEvent

Called when a player interacts with an armor stand and will either swap, retrieve or place an item.

  • #include <endstone/event/player/player_armor_stand_manipulate_event.h>

Inherits the following classes: endstone::PlayerInteractActorEvent

Public Functions

Type Name
ENDSTONE_EVENT (PlayerArmorStandManipulateEvent)
PlayerArmorStandManipulateEvent (const NotNull< Player > & player, const NotNull< Actor > & right_clicked, ItemStack armor_stand_item, ItemStack player_item, EquipmentSlot slot)
const ItemStack & getArmorStandItem () const
Gets the item held by the armor stand in the affected slot.
const ItemStack & getPlayerItem () const
Gets the item held by the player during the interaction.
EquipmentSlot getSlot () const
Gets the armor stand equipment slot affected by the interaction.

Public Functions inherited from endstone::PlayerInteractActorEvent

See endstone::PlayerInteractActorEvent

Type Name
ENDSTONE_EVENT (PlayerInteractActorEvent)
PlayerInteractActorEvent (const NotNull< Player > & player, const NotNull< Actor > & actor)
const NotNull< Actor > & getActor () const
Gets the actor that was right-clicked by the player.
~PlayerInteractActorEvent () override

Public Functions inherited from endstone::Cancellable

See endstone::Cancellable

Type Name
virtual void cancel ()
Cancel this event.
virtual bool isCancelled () override const
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) override
Sets the cancellation state of this event.

Public Functions inherited from endstone::ICancellable

See endstone::ICancellable

Type Name
virtual void cancel () = 0
Cancels this event.
virtual bool isCancelled () const = 0
Gets the cancellation state of this event.
virtual void setCancelled (bool cancel) = 0
Sets the cancellation state of this event.
virtual ~ICancellable () = default

Public Functions Documentation

function ENDSTONE_EVENT

endstone::PlayerArmorStandManipulateEvent::ENDSTONE_EVENT (
    PlayerArmorStandManipulateEvent
) 

function PlayerArmorStandManipulateEvent

inline endstone::PlayerArmorStandManipulateEvent::PlayerArmorStandManipulateEvent (
    const  NotNull < Player > & player,
    const  NotNull < Actor > & right_clicked,
    ItemStack armor_stand_item,
    ItemStack player_item,
    EquipmentSlot slot
) 

function getArmorStandItem

Gets the item held by the armor stand in the affected slot.

inline const  ItemStack & endstone::PlayerArmorStandManipulateEvent::getArmorStandItem () const

Returns:

the item held by the armor stand


function getPlayerItem

Gets the item held by the player during the interaction.

inline const  ItemStack & endstone::PlayerArmorStandManipulateEvent::getPlayerItem () const

Returns:

the item held by the player


function getSlot

Gets the armor stand equipment slot affected by the interaction.

inline EquipmentSlot endstone::PlayerArmorStandManipulateEvent::getSlot () const

Returns:

the affected armor stand slot



The documentation for this class was generated from the following file include/endstone/event/player/player_armor_stand_manipulate_event.h