Skip to content

Class endstone::PlayerShearActorEvent

ClassList > endstone > PlayerShearActorEvent

Called when a player shears an Actor .

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

Inherits the following classes: endstone::Cancellable

Public Functions

Type Name
ENDSTONE_EVENT (PlayerShearActorEvent)
PlayerShearActorEvent (const NotNull< Player > & player, const NotNull< Actor > & actor, ItemStack item, EquipmentSlot hand)
const NotNull< Actor > & getActor () const
Gets the Actor the player is shearing.
EquipmentSlot getHand () const
Gets the hand used to shear the Actor .
const ItemStack & getItem () const
Gets the item used to shear the Actor .

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::PlayerShearActorEvent::ENDSTONE_EVENT (
    PlayerShearActorEvent
) 

function PlayerShearActorEvent

inline endstone::PlayerShearActorEvent::PlayerShearActorEvent (
    const  NotNull < Player > & player,
    const  NotNull < Actor > & actor,
    ItemStack item,
    EquipmentSlot hand
) 

function getActor

Gets the Actor the player is shearing.

inline const  NotNull < Actor > & endstone::PlayerShearActorEvent::getActor () const

Returns:

the Actor the player is shearing


function getHand

Gets the hand used to shear the Actor .

inline EquipmentSlot endstone::PlayerShearActorEvent::getHand () const

Returns:

the hand


function getItem

Gets the item used to shear the Actor .

inline const  ItemStack & endstone::PlayerShearActorEvent::getItem () const

Returns:

the shears



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