import { type JSONTextComponent, type Score, type SelectorClass } from "sandstone"; /** * Commands for interacting with Kradle's Watcher. */ export declare const Commands: { /** * Raw command - sends a command to Kradle's Watcher. * * Arguments are passed as a JSON object. * @param command The command to send. * @param args The JSON Text Component arguments to send with the command. * * @warning * The arguments must resolve to a JSON-serializable object. This cannot be verified at compile time. * * @example * Commands.raw("start_challenge", { name: "My Challenge" }); * // The watcher will receive the following payload:: * // {"type":"kradle_command","command":"start_challenge","arguments":{"name":"My Challenge"}} * * Commands.raw("fetch", {url: "https://goldprice.org", "target_score": "gold_price", callback: "kradle:on_gold_price_fetched"}) * // The watcher will receive the following payload: * // {"type":"kradle_command","command":"fetch","arguments":{"url":"https://goldprice.org","target_score":"gold_price","callback":"kradle:on_gold_price_fetched"}} */ raw: (command: string, args: Record) => void; /** * Game over command - sends a command to Kradle's Watcher to end the challenge. * This will also announce the winners and the end state. * * The `winners` argument of the payload will be a JSON list of player names. * Ex: { "winners": ["player1", "player2"] } * * If no winners are selected, an empty array will be sent. * Ex: { "winners": [] } * * The `end_state` argument of the payload will be a JSON string that represents the end state of the challenge. * Ex: { "end_state": "win" } * * If no end state is selected, an empty string will be sent. * Ex: { "end_state": "" } */ gameOver: () => void; logVariable: (message: string, variable: Score, store: boolean) => void; /** * Force-move command — tells Kradle's Watcher to interrupt the target * player(s) and walk them to absolute coordinates. Server-initiated. * * Targets are sent as a JSON array of resolved player names, coordinates as * JSON numbers: * { "targets": ["player1","player2"], "x": 10, "y": -60, "z": 12 } * * The `_.if` guard suppresses the command when the selector matches nobody * (selectorToJSONArray would otherwise emit `[""]`). */ forceMoveTo: (targetSelector: SelectorClass, x: number, y: number, z: number) => void; }; //# sourceMappingURL=commands.d.ts.map