Class endstone::PlayerLevelChangeEvent¶
ClassList > endstone > PlayerLevelChangeEvent
Represents an event that is called when a player's level changes.
#include <endstone/event/player/player_level_change_event.h>
Inherits the following classes: endstone::PlayerEvent
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerLevelChangeEvent) |
|
| PlayerLevelChangeEvent (const NotNull< Player > & player, int old_level, int new_level) |
|
| int | getNewLevel () const Gets the player's level after the change. |
| int | getOldLevel () const Gets the player's level before the change. |
Public Functions inherited from endstone::PlayerEvent¶
| Type | Name |
|---|---|
| PlayerEvent (const NotNull< Player > & player) |
|
| const NotNull< Player > & | getPlayer () const Returns the player involved in this event. |
| ~PlayerEvent () override |
Public Functions inherited from endstone::Event¶
See endstone::Event
| Type | Name |
|---|---|
| Event (bool async=false) |
|
| Event (const Event &) = delete |
|
| Event (Event &&) = default |
|
| virtual std::string | getEventName () const = 0 Gets a user-friendly identifier for this event. |
| bool | isAsynchronous () const Any custom event that should not by synchronized with other events must use the specific constructor. |
| Event & | operator= (const Event &) = delete |
| Event & | operator= (Event &&) = default |
| virtual | ~Event () = default |
Protected Attributes inherited from endstone::PlayerEvent¶
| Type | Name |
|---|---|
| NotNull< Player > | player_ |
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerLevelChangeEvent¶
inline endstone::PlayerLevelChangeEvent::PlayerLevelChangeEvent (
const NotNull < Player > & player,
int old_level,
int new_level
)
function getNewLevel¶
Gets the player's level after the change.
Returns:
the player's new level
function getOldLevel¶
Gets the player's level before the change.
Returns:
the player's previous level
The documentation for this class was generated from the following file include/endstone/event/player/player_level_change_event.h