Runtime

Tells code where it is running, which helps in shared scripts used on both the server and clients.

runtime.isClient

isClient: boolean

True in a player's game.

runtime.isServer

isServer: boolean

True on the server.

runtime.apiVersion

apiVersion: string

The version of the script API.

runtime.serverVersion

serverVersion: string

The KCDS version on this side, or '' if unknown.

runtime.serverDir

serverDir: string

The server's folder, which holds resources/ and server.json. On a client it is null. A deployment replaces the resource's own folder, process.cwd(), so keep saved data under this one.