PluginContext

interface PluginContext

Per-plugin access to platform-provided facilities.

Stability rules

  • This is the only object a plugin needs to keep around.

  • It is platform-agnostic: implementations live in platform adapters.

  • It is intentionally capability-oriented instead of exposing a giant "Server" object.

Properties

Link copied to clipboard

Command registration and dispatch (logic only; IO bridges are platform-specific).

Link copied to clipboard
abstract val configs: ConfigManager

Typed configuration access with versioned migrations.

Link copied to clipboard
abstract val events: EventBus

Event publishing and subscription.

Link copied to clipboard
abstract val logger: KtaleLogger

A logger scoped to this plugin.

Link copied to clipboard
abstract val pluginId: String

A human-readable plugin identifier (stable across reloads).

Link copied to clipboard
abstract val prefabs: PrefabStore?

Prefab storage/hosting, if the platform supports it.

Link copied to clipboard
abstract val scheduler: Scheduler

Scheduling API for sync/async/delayed/repeating work.

Link copied to clipboard

Service registry used as "DI-light".