GameplayBedrockEducation

/wsserver

also /connect

Connects the game client to an external WebSocket server so that server can send commands and receive game events — the basis of classroom and coding integrations. /connect is the common alias. Closing is done with /closewebsocket.

Syntax

Parameters

serverUri
string
WebSocket URL, e.g. localhost:19131.

Examples

  • Connect to a local WebSocket server.

Permission level

/wsserver requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.