Skip to content

Class endstone::PlayerExpChangeEvent

ClassList > endstone > PlayerExpChangeEvent

Called when a player's experience changes.

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

Inherits the following classes: endstone::PlayerEvent

Public Functions

Type Name
ENDSTONE_EVENT (PlayerExpChangeEvent)
PlayerExpChangeEvent (const NotNull< Player > & player, int amount)
int getAmount () const
Gets the amount of experience gained by the player.
void setAmount (int amount)
Sets the amount of experience the player will be given.

Public Functions inherited from endstone::PlayerEvent

See 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

See endstone::PlayerEvent

Type Name
NotNull< Player > player_

Public Functions Documentation

function ENDSTONE_EVENT

endstone::PlayerExpChangeEvent::ENDSTONE_EVENT (
    PlayerExpChangeEvent
) 

function PlayerExpChangeEvent

inline endstone::PlayerExpChangeEvent::PlayerExpChangeEvent (
    const  NotNull < Player > & player,
    int amount
) 

function getAmount

Gets the amount of experience gained by the player.

inline int endstone::PlayerExpChangeEvent::getAmount () const

Returns:

the amount of experience gained


function setAmount

Sets the amount of experience the player will be given.

inline void endstone::PlayerExpChangeEvent::setAmount (
    int amount
) 

Parameters:

  • amount the amount of experience to give


The documentation for this class was generated from the following file include/endstone/event/player/player_exp_change_event.h