Skip to content

Class endstone::PlayerJoinEvent

ClassList > endstone > PlayerJoinEvent

Called when a player joins a server.

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

Inherits the following classes: endstone::PlayerEvent

Public Functions

Type Name
ENDSTONE_EVENT (PlayerJoinEvent)
PlayerJoinEvent (Player & player, std::optional< Message > join_message)
std::optional< Message > getJoinMessage () const
Gets the join message to send to all online players.
void setJoinMessage (std::optional< Message > message)
Sets the join message to send to all online players.

Public Functions inherited from endstone::PlayerEvent

See 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

endstone::PlayerJoinEvent::ENDSTONE_EVENT (
    PlayerJoinEvent
) 

function PlayerJoinEvent

inline explicit endstone::PlayerJoinEvent::PlayerJoinEvent (
    Player & player,
    std::optional< Message > join_message
) 

function getJoinMessage

Gets the join message to send to all online players.

inline std::optional< Message > endstone::PlayerJoinEvent::getJoinMessage () const

Returns:

Message to appear to other players on the server.


function setJoinMessage

Sets the join message to send to all online players.

inline void endstone::PlayerJoinEvent::setJoinMessage (
    std::optional< Message > message
) 

Parameters:

  • 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_join_event.h