Skip to content

Instantly share code, notes, and snippets.

@KevoMeister
KevoMeister / CommandRequest.js
Created June 27, 2021 10:06 — forked from jocopa3/CommandRequest.js
MCPE/Win10 WebSocket JSON Messages
// For more information about available commands, look at the commands/standard.json file in the game's assets.
{
"body": {
"input": {}, // Command inputs go here
"origin": {
"type": "player" // Where the command originates from
},
"name": "name-of-command", // Command name goes here (i.e. for /say, enter "say")
"version": 1,
// To subscribe to an event, pass this JSON text to the client through the WebSocket:
{
"body": {
"eventName": "NameOfEvent" // Replace with an event name listed below
},
"header": {
"requestId": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx", // UUID
"messagePurpose": "subscribe",
"version": 1, // Protocol version (currently 1 as-of 1.0.2)