Class endstone::PlayerDeathEvent¶
ClassList > endstone > PlayerDeathEvent
Called when a Player dies.
#include <endstone/event/player/player_death_event.h>
Inherits the following classes: endstone::ActorDeathEvent, endstone::PlayerEvent
Public Static Attributes inherited from endstone::ActorDeathEvent¶
Type | Name |
---|---|
const std::string | NAME = "ActorDeathEvent" |
Public Functions¶
Type | Name |
---|---|
ENDSTONE_EVENT (PlayerDeathEvent) |
|
PlayerDeathEvent (Player & player, std::unique_ptr< DamageSource > damage_source, std::optional< Message > death_message) |
|
std::optional< Message > | getDeathMessage () const Get the death message that will appear to everyone on the server. |
void | setDeathMessage (std::optional< Message > death_message) Set the death message that will appear to everyone on the server. |
Public Functions inherited from endstone::ActorDeathEvent¶
Type | Name |
---|---|
ActorDeathEvent (Mob & actor, std::unique_ptr< DamageSource > damage_source) |
|
DamageSource & | getDamageSource () const Gets the source of damage which caused the death. |
virtual std::string | getEventName () override const |
Public Functions inherited from endstone::ActorEvent¶
Type | Name |
---|---|
ActorEvent (ActorType & actor) |
|
ActorType & | getActor () const Returns the Actor involved in this event. |
~ActorEvent () override |
Public Functions inherited from endstone::Event¶
See endstone::Event
Type | Name |
---|---|
Event (bool async=false) |
|
Event (const Event &) = delete |
|
virtual std::string | getEventName () const = 0 |
bool | isAsynchronous () const |
Event & | operator= (const Event &) = delete |
virtual | ~Event () = default |
Public Functions inherited from endstone::PlayerEvent¶
Type | Name |
---|---|
PlayerEvent (Player & player) |
|
Player & | getPlayer () const |
~PlayerEvent () override |
Public Functions inherited from endstone::Event¶
See endstone::Event
Type | Name |
---|---|
Event (bool async=false) |
|
Event (const Event &) = delete |
|
virtual std::string | getEventName () const = 0 |
bool | isAsynchronous () const |
Event & | operator= (const Event &) = delete |
virtual | ~Event () = default |
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerDeathEvent¶
inline explicit endstone::PlayerDeathEvent::PlayerDeathEvent (
Player & player,
std::unique_ptr< DamageSource > damage_source,
std::optional< Message > death_message
)
function getDeathMessage¶
Get the death message that will appear to everyone on the server.
Returns:
Message to appear to other players on the server.
function setDeathMessage¶
Set the death message that will appear to everyone on the server.
Parameters:
death_message
Message to appear to other players on the server.
The documentation for this class was generated from the following file include/endstone/event/player/player_death_event.h