@lands.io/mod-sdk / Executor
Interface: Executor¶
Executor interface for registering action hooks and intent handlers.
Table of contents¶
Properties¶
Methods¶
Properties¶
modId¶
• Readonly modId: string
The current mod's ID (e.g., 'local:team-mode' or 'uuid-of-published-mod')
modState¶
• Readonly modState: ModState
The mod's in-game state
registerActionHooks¶
• Readonly registerActionHooks: ActionHooksRegistry
Register hooks to customize built-in action behavior
scenario¶
• Readonly scenario: ScenarioSetup
Init-only scenario setup API (throws if used late)
Methods¶
registerModIntentHandler¶
▸ registerModIntentHandler(modId, intentName, handler): void
Register a handler for custom mod intents
Parameters¶
| Name | Type |
|---|---|
modId |
string |
intentName |
string |
handler |
(intent: ModIntent) => Execution |
Returns¶
void
requestClientAction¶
▸ requestClientAction(action): void
Request an ephemeral client-side control action.
Parameters¶
| Name | Type |
|---|---|
action |
ModClientAction |
Returns¶
void
Source Code¶
View full implementation
/**
* Executor interface for registering action hooks and intent handlers.
*/
export interface Executor {
/** The mod's in-game state */
readonly modState: ModState;
/** The current mod's ID (e.g., 'local:team-mode' or 'uuid-of-published-mod') */
readonly modId: string;
/** Init-only scenario setup API (throws if used late) */
readonly scenario: ScenarioSetup;
/** Register hooks to customize built-in action behavior */
readonly registerActionHooks: ActionHooksRegistry;
/** Register a handler for custom mod intents */
registerModIntentHandler(
modId: string,
intentName: string,
handler: (intent: ModIntent) => Execution
): void;
/** Request an ephemeral client-side control action. */
requestClientAction(action: ModClientAction): void;
}