Generated from the shipped type definitions.
Game-event subscriptions on this plugin's load-scope (PluginContext.events).
Handlers fire for clients that connect AFTER Active. To cover already-connected clients, seed
explicitly in OnPluginStart: for (const c of Clients.all()) { … } — there is no framework
replay (replaying onConnect for pre-existing clients would fire auth/ban/reservation logic
out of its real order).
Entity lifecycle / I/O subscriptions on this plugin's load-scope (PluginContext.entities).
Per-frame + map/precache hooks on this plugin's load-scope (PluginContext.server).
Console/chat command registration on this plugin's load-scope (PluginContext.commands).
The phrase files this plugin uses (PluginContext.translations).
Nothing is loaded automatically — a plugin declares what it needs, the same rule SourceMod's
LoadTranslations enforces. The build reads this call to work out which keys cmd.replyT and
Translations.translate will accept, so a key from a file you did not load is a compile error.
Config live-reload subscription on this plugin's load-scope (PluginContext.config).
A producer-backed inter-plugin interface: its methods, plus forward subscriptions.
A disposable bundle of subscriptions (PluginContext.createScope). Registering through a scope
lets you drop the whole group at once with Scope.clear without unloading the plugin.
The load-scoped context the host builds for one plugin load. Public authoring uses
hook / command / named publics instead of receiving this object.
Scope reuses the same subscription namespaces.
— This plugin's id (manifest id). readonly previous: unknown
— The revived hot-reload handoff (the previous instance's state() return), or undefined.readonly events: CtxEvents
— Game-event subscriptions (CtxEvents).readonly clients: CtxClients
— Client-lifecycle subscriptions (CtxClients).readonly entities: CtxEntities
— Entity lifecycle / I/O subscriptions (CtxEntities).readonly server: CtxServer
— Per-frame/map/precache subscriptions (CtxServer).readonly commands: CtxCommands
— Console/chat command registration (CtxCommands).readonly config: CtxConfig
— Config live-reload subscription (CtxConfig).readonly translations: CtxTranslations
— Phrase files this plugin uses (CtxTranslations).publish(name: string, impl: T): PublishHandle
— Publish this plugin's manifest-declared interface. Buffered; goes live at Active.use(name: string): InterfaceHandle<T>
— Resolve a HARD dep (must be in pluginDependencies). Immediate — the proxy is callable during OnPluginStart.tryUse(name: string): InterfaceHandle<T> | null
— Resolve an OPTIONAL dep (must be in optionalPluginDependencies); null while unpublished. — Allocate a disposable subscription scope (load-window only — the capability originates at load). Optional lifecycle hooks a plugin may return to participate in unload + hot-reload.
Public authoring uses export function OnPluginEnd / OnPluginState instead.
Game-event catalog. Load-window only — throws after settle (same window as command).
hook.on is post-fire; hook.onPre is pre (Handled/Stop suppress the client broadcast).
The GameEvent is valid only synchronously.
fn onOutput(classname: string, output: string, handler: (ev: OutputEvent) => HookResultValue | void): void
Load-window entity I/O subscribe (SourceMod HookEntityOutput). Keyed by (classname, output)
at the native mux — use "*" for either side. Throws after settle.
The revived hot-reload handoff (the previous instance's OnPluginState return), or undefined.
Load-window only.
This plugin's id (manifest id). Load-window only.
Allocate a disposable subscription scope. Load-window only — same contract as
PluginContext.createScope.
fn publish(name: string, impl: T): PublishHandle
Publish this plugin's manifest-declared interface. Load-window only (buffered, armed at Active).
Same contract as PluginContext.publish.
fn use(name: string): InterfaceHandle<T>
Resolve a HARD dep (must be in pluginDependencies). Load-window only.
Same contract as PluginContext.use. Prefer import { greet } from "@demo/greeter" for
the producer-as-import form; use() remains the explicit load-window form and the optional-dep path.
fn tryUse(name: string): InterfaceHandle<T> | null
Resolve an OPTIONAL dep (must be in optionalPluginDependencies); null while unpublished.
Load-window only. Same contract as PluginContext.tryUse.
Load-window phrase-file declaration. Same contract as PluginContext.translations.
Throws after settle. s2s build / sync-phrase-types.mjs collect translations.load(...)
the same way they collect ctx.translations.load(...).