Skip to Content
⚠ Under Construction
ReferenceC++ APIPlayerDeathEvent

endstone::PlayerDeathEvent

Called when a Player dies.

Bases: endstone::ActorDeathEvent, endstone::PlayerEvent

Functions:

NameDescription
PlayerDeathEvent
getDeathMessageGet the death message that will appear to everyone on the server.
setDeathMessageSet the death message that will appear to everyone on the server.

PlayerDeathEvent

PlayerDeathEvent(Player &player, std::unique_ptr<DamageSource> damage_source, std::optional<Message> death_message)

getDeathMessage

std::optional<Message> getDeathMessage() const

Get the death message that will appear to everyone on the server.

Returns:

Message to appear to other players on the server.

setDeathMessage

void setDeathMessage(std::optional<Message> death_message)

Set the death message that will appear to everyone on the server.

Parameters:

  • death_message Message to appear to other players on the server.
Last updated on