Skip to content

Class endstone::PlayerRespawnEvent

ClassList > endstone > PlayerRespawnEvent

Called when a player respawns.

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

Inherits the following classes: endstone::PlayerEvent

Public Types

Type Name
enum RespawnReason
An enum to specify the reason a respawn occurred.

Public Functions

Type Name
ENDSTONE_EVENT (PlayerRespawnEvent)
PlayerRespawnEvent (Player & player, RespawnReason reason)
RespawnReason getRespawnReason () const
Gets the reason this respawn occurred.
~PlayerRespawnEvent () override

Public Functions inherited from endstone::PlayerEvent

See endstone::PlayerEvent

Type Name
PlayerEvent (Player & player)
Player & getPlayer () const
Returns the player involved in this event.
~PlayerEvent () override

Public Functions inherited from endstone::Event

See endstone::Event

Type Name
Event (bool async=false)
Event (const Event &) = delete
Event (Event &&) = default
virtual std::string getEventName () const = 0
Gets a user-friendly identifier for this event.
bool isAsynchronous () const
Any custom event that should not by synchronized with other events must use the specific constructor.
Event & operator= (const Event &) = delete
Event & operator= (Event &&) = default
virtual ~Event () = default

Protected Attributes inherited from endstone::PlayerEvent

See endstone::PlayerEvent

Type Name
std::reference_wrapper< Player > player_

Public Types Documentation

enum RespawnReason

An enum to specify the reason a respawn occurred.

enum endstone::PlayerRespawnEvent::RespawnReason {
    Death,
    EndPortal
};


Public Functions Documentation

function ENDSTONE_EVENT

endstone::PlayerRespawnEvent::ENDSTONE_EVENT (
    PlayerRespawnEvent
) 

function PlayerRespawnEvent

inline endstone::PlayerRespawnEvent::PlayerRespawnEvent (
    Player & player,
    RespawnReason reason
) 

function getRespawnReason

Gets the reason this respawn occurred.

inline RespawnReason endstone::PlayerRespawnEvent::getRespawnReason () const

Returns:

the reason the respawn occurred.


function ~PlayerRespawnEvent

endstone::PlayerRespawnEvent::~PlayerRespawnEvent () override


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