S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / API reference

IPlayerManager

Provides read-only access to players in the active session.

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

Provides read-only access to players in the active session.

Members

LocalPlayer

property
IPlayer? LocalPlayer

Gets the player controlled by this game instance, or null outside an active world.

ConnectedPlayers

property
IReadOnlyList<IPlayer> ConnectedPlayers

Gets a roster snapshot of all currently connected players.

The returned list is a new read-only snapshot. Its IPlayer objects continue to represent their players until they disconnect.

TryGetPlayer

method
bool TryGetPlayer(ulong clientId, out IPlayer? player)

Tries to find a connected player by session client ID.