Preferences - tsukinoko-kun/papermc-web-api GitHub Wiki

Modify the plugin at plugins/papermc-web-api/preferences.jsonc.

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "httpPort": {
      "type": "integer"
    },
    "basePath": {
      "type": "string"
    },
    "secret": {
      "type": "string"
    },
    "clients": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "redirectUri": {
              "type": "string"
            },
            "scopes": {
              "type": "array",
              "items": [
                {
                  "type": "string"
                }
              ]
            }
          },
          "required": [
            "name",
            "id",
            "redirectUri",
            "scopes"
          ]
        }
      ]
    },
    "luaCmd": {
      "type": "boolean"
    }
  },
  "required": [
    "httpPort",
    "secret",
    "clients"
  ]
}

Example

{
    "httpPort": 8080, // Port for the integrated server
    "basePath": "", // URL Path prefix
    "secret": "M2U0MDkyZjYtMjM2Mi00ZjE2LTkxNjgtM2NkOGNmMDAyMzdi", // Random string used for hashing
    "clients": [ // OAuth clients
        {
            "name": "First demo client", // visible title
            "id": "d01", // internal identifier
            "redirectUri": "https://client1.example.com/callback", // url to return to when login was successful
            "scopes": [ // user permissions
                "command"
            ]
        }
    ],
    "luaCmd": true // enables the lua in-game command
}

Valid scopes

command

Execute in-game commands

lua

Execute Lua code/functions