Modules

Docs / API / Modules / console

Console

Platform

@s2script/sdk/console

Injected console logging for plugins.

1 export

Import

import { console } from "@s2script/sdk/console";

Author-time types ship in the npm package; the engine injects the runtime at plugin load. Add @s2script/sdk to your plugin's dependencies.

API reference

Generated from the shipped type definitions.

const
console

Engine-provided console (log/error/warn/info). Also available as the global console.

log(...data: any[]): void

Write a line to the server console (and the log). Arguments are stringified and space-joined.

import { console } from "@s2script/sdk/console";
console.log("[antiflood] onLoad — chat flood protection active");
error(...data: any[]): void
Write a line at error severity.
warn(...data: any[]): void
Write a line at warning severity.
info(...data: any[]): void
Write a line at info severity.
Back to modules All packages

s2script — Source 2 plugin framework

GitHub