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 (const NotNull< Player > & player, const NotNull< Dimension > & from, const NotNull< Dimension > & to)
const NotNull< Dimension > & getFrom () const
Gets the dimension the player is switching from.
const NotNull< Dimension > & getTo () const
Gets the dimension the player is switching to.

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::PlayerDimensionChangeEvent::ENDSTONE_EVENT (
    PlayerDimensionChangeEvent
) 

function PlayerDimensionChangeEvent

inline explicit endstone::PlayerDimensionChangeEvent::PlayerDimensionChangeEvent (
    const  NotNull < Player > & player,
    const  NotNull < Dimension > & from,
    const  NotNull < Dimension > & to
) 

function getFrom

Gets the dimension the player is switching from.

inline const  NotNull < Dimension > & endstone::PlayerDimensionChangeEvent::getFrom () const

Returns:

player's previous dimension


function getTo

Gets the dimension the player is switching to.

inline const  NotNull < 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