Class endstone::PlayerQuitEvent¶
ClassList > endstone > PlayerQuitEvent
Called when a player leaves a server.
#include <endstone/event/player/player_quit_event.h>
Inherits the following classes: endstone::PlayerEvent
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerQuitEvent) |
|
| PlayerQuitEvent (Player & player, std::optional< Message > quit_message) |
|
| std::optional< Message > | getQuitMessage () const Gets the quit message to send to all online players. |
| void | setQuitMessage (std::optional< Message > message) Sets the quit message to send to all online players. |
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 |
Protected Attributes inherited from endstone::PlayerEvent¶
| Type | Name |
|---|---|
| std::reference_wrapper< Player > | player_ |
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerQuitEvent¶
inline explicit endstone::PlayerQuitEvent::PlayerQuitEvent (
Player & player,
std::optional< Message > quit_message
)
function getQuitMessage¶
Gets the quit message to send to all online players.
Returns:
Message to appear to other players on the server.
function setQuitMessage¶
Sets the quit message to send to all online players.
Parameters:
messageMessage to appear to other players on the server.
The documentation for this class was generated from the following file include/endstone/event/player/player_quit_event.h