Skip to Content
⚠ Under Construction
ReferenceC++ APIPlayerMoveEvent

endstone::PlayerMoveEvent

Called when a player moves.

Bases: endstone::Cancellable< PlayerEvent >

Attributes:

NameDescription
from\_
to\_

Functions:

NameDescription
PlayerMoveEvent
getFromGets the location this player moved from.
getToGets the location this player moved to.
setFromSets the location to mark as where the player moved from.
setToSets the location that this player will move to.

from_

Location endstone::PlayerMoveEvent::from_;

to_

Location endstone::PlayerMoveEvent::to_;

PlayerMoveEvent

PlayerMoveEvent(Player &player, Location from, Location to)

getFrom

const Location &getFrom() const

Gets the location this player moved from.

Returns:

Location the player moved from

getTo

const Location &getTo() const

Gets the location this player moved to.

Returns:

Location the player moved to

setFrom

Result<void> setFrom(const Location &from)

Sets the location to mark as where the player moved from.

Parameters:

  • from New location to mark as the players previous location

setTo

Result<void> setTo(const Location &to)

Sets the location that this player will move to.

Parameters:

  • to New Location this player will move to
Last updated on