Skip to content

Class endstone::PlayerEmoteEvent

ClassList > endstone > PlayerEmoteEvent

Called when a player uses an emote.

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

Inherits the following classes: endstone::Cancellable

Public Functions

Type Name
ENDSTONE_EVENT (PlayerEmoteEvent)
PlayerEmoteEvent (Player & player, std::string emote_id, bool muted)
std::string getEmoteId () const
Gets the emote piece ID.
bool isMuted () const
Gets the muted state for the emote.
void setMuted (bool muted)
Sets the muted state for the emote.
~PlayerEmoteEvent () override

Public Functions inherited from endstone::Cancellable

See endstone::Cancellable

Type Name
virtual void cancel ()
Cancel this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
virtual bool isCancelled () override const
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
virtual void setCancelled (bool cancel) override
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Public Functions inherited from endstone::ICancellable

See endstone::ICancellable

Type Name
virtual void cancel () = 0
virtual bool isCancelled () const = 0
virtual void setCancelled (bool cancel) = 0
virtual ~ICancellable () = default

Public Functions Documentation

function ENDSTONE_EVENT

endstone::PlayerEmoteEvent::ENDSTONE_EVENT (
    PlayerEmoteEvent
) 

function PlayerEmoteEvent

inline explicit endstone::PlayerEmoteEvent::PlayerEmoteEvent (
    Player & player,
    std::string emote_id,
    bool muted
) 

function getEmoteId

Gets the emote piece ID.

inline std::string endstone::PlayerEmoteEvent::getEmoteId () const

Returns:

The emote piece ID


function isMuted

Gets the muted state for the emote.

inline bool endstone::PlayerEmoteEvent::isMuted () const

This method determines whether the emote is being executed without sending a chat message about the emote.

Returns:

true if the emote is muted, false otherwise.


function setMuted

Sets the muted state for the emote.

inline void endstone::PlayerEmoteEvent::setMuted (
    bool muted
) 

Note:

If set to true, the emote will be executed silently, and no chat messages will be sent.

Parameters:

  • muted true to mute the emote and disable chat messages, false to unmute it.

function ~PlayerEmoteEvent

endstone::PlayerEmoteEvent::~PlayerEmoteEvent () override


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