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¶
| Type | Name |
|---|---|
| const std::string | NAME = "PlayerDeathEvent" |
Public Static Attributes inherited from endstone::ActorDeathEvent¶
| Type | Name |
|---|---|
| const std::string | NAME = "ActorDeathEvent" |
Public Functions¶
| Type | Name |
|---|---|
| PlayerDeathEvent (Player & player, std::unique_ptr< DamageSource > damage_source, std::string death_message) |
|
| const std::string & | getDeathMessage () const Get the death message that will appear to everyone on the server. |
| virtual std::string | getEventName () override const |
| void | setDeathMessage (const std::string & death_message) Set the death message that will appear to everyone on the server. |
| ~PlayerDeathEvent () override |
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 Static Attributes Documentation¶
variable NAME¶
Public Functions Documentation¶
function PlayerDeathEvent¶
inline explicit endstone::PlayerDeathEvent::PlayerDeathEvent (
Player & player,
std::unique_ptr< DamageSource > damage_source,
std::string 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 getEventName¶
Gets a user-friendly identifier for this event.
Returns:
name of this event
Implements endstone::ActorDeathEvent::getEventName
function setDeathMessage¶
Set the death message that will appear to everyone on the server.
Parameters:
death_messageMessage to appear to other players on the server.
function ~PlayerDeathEvent¶
The documentation for this class was generated from the following file include/endstone/event/player/player_death_event.h