S9SourceNine Labs / CMAPI Docs 1.0
CMAPI / API reference

IModRegistry

Provides safe feature and loaded-mod discovery.

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

Provides safe feature and loaded-mod discovery.

Members

ApiVersion

property
string ApiVersion

Gets the semantic version of the active CMAPI public API.

Features

property
IReadOnlyList<string> Features

Gets the feature identifiers available in this game session.

SupportsFeature

method
bool SupportsFeature(string featureId)

Returns whether the given CMAPI runtime feature is available.

IsLoaded

method
bool IsLoaded(string uniqueId)

Returns whether a mod with the exact unique ID is loaded.

IsLoaded

method
bool IsLoaded(string uniqueId, string minimumVersion)

Returns whether a mod is loaded at or above the requested semantic version.

GetVersion

method
string? GetVersion(string uniqueId)

Gets a loaded mod's version, or null if it is absent.