Skip to content

Class endstone::PlayerDimensionChangeEvent

ClassList > endstone > PlayerDimensionChangeEvent

Called when a player switches to another dimension.

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

Inherits the following classes: endstone::PlayerEvent

Public Functions

Type Name
ENDSTONE_EVENT (PlayerDimensionChangeEvent)
PlayerDimensionChangeEvent (Player & player, Dimension & from, Dimension & to)
Dimension & getFrom () const
Gets the dimension the player is switching from.
Dimension & getTo () const
Gets the dimension the player is switching to.

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

Protected Attributes inherited from endstone::PlayerEvent

See endstone::PlayerEvent

Type Name
std::reference_wrapper< Player > player_

Public Functions Documentation

function ENDSTONE_EVENT

endstone::PlayerDimensionChangeEvent::ENDSTONE_EVENT (
    PlayerDimensionChangeEvent
) 

function PlayerDimensionChangeEvent

inline explicit endstone::PlayerDimensionChangeEvent::PlayerDimensionChangeEvent (
    Player & player,
    Dimension & from,
    Dimension & to
) 

function getFrom

Gets the dimension the player is switching from.

inline Dimension & endstone::PlayerDimensionChangeEvent::getFrom () const

Returns:

player's previous dimension


function getTo

Gets the dimension the player is switching to.

inline Dimension & endstone::PlayerDimensionChangeEvent::getTo () const

Returns:

player's new dimension



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