S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / API reference

IPlayerPlacementManager

Provides host-safe, same-planet placement for the local player.

View source ↗
CMAPI 1.0.0Standalone runtimeWindows x64Tested with Planet Crafter 2.008
Namespace CMAPIInterfaceAssembly CMAPI.API.dll
public interface IPlayerPlacementManager

Provides host-safe, same-planet placement for the local player.

Members

HasReturnPoint

property
bool HasReturnPoint

Gets whether this mod currently has a valid candidate return point.

The point is revalidated against the live player and planet when ReturnAsync is called.

TeleportAsync

method
Task<PlayerPlacementResult> TeleportAsync(WorldPosition destination)

Moves the local host player to finite coordinates on the currently loaded planet and records the origin as this mod's return point.

ReturnAsync

method
Task<PlayerPlacementResult> ReturnAsync()

Returns the local host player to this mod's previous placement point. A successful return stores the origin as the next return point, so repeated calls can move back and forth.

ClearReturnPoint

method
void ClearReturnPoint()

Clears this mod's in-memory return point.