{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "additionalProperties": {},
  "definitions": {
    "PermissionChildren": {
      "additionalProperties": {
        "properties": {
          "children": {
            "$ref": "#/definitions/PermissionChildren",
            "description": "The child permissions. Toggling the parent permission will toggle all child permissions too."
          },
          "default": {
            "description": "Indicates whether players have this permission by default.",
            "enum": [
              "!admin",
              "!op",
              "!operator",
              "admin",
              false,
              "false",
              "isadmin",
              "isop",
              "isoperator",
              "notadmin",
              "notop",
              "notoperator",
              "op",
              "operator",
              true,
              "true"
            ]
          },
          "description": {
            "description": "Description of the permission",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "object"
    },
    "VersionConstraint": {
      "description": "The name of the extension, or a mapping of the extension to the required version constraint.",
      "pattern": "\\*|((<=|le|<>|!=|ne|<|lt|==|=|eq|>=|ge|>|gt).*)",
      "type": "string"
    }
  },
  "id": "https://json.schemastore.org/pocketmine-plugin.json",
  "properties": {
    "api": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "string"
        }
      ],
      "description": "The PocketMine API version(s) supported by the plugin. The array should be minimized such that no two API versions."
    },
    "author": {
      "description": "The author name",
      "type": "string"
    },
    "authors": {
      "description": "The author names, will be appended to `author` if both are present",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "commands": {
      "description": "The commands to be registered automatically. The keys are command name. Commands can also be dynamically registered with the server CommandMap.",
      "additionalProperties": {
        "properties": {
          "aliases": {
            "description": "Aliases of the command",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "description": "Description of the command as shown in /help",
            "type": "string"
          },
          "permission": {
            "description": "Name of the permission to check for, or multiple permissions separated",
            "type": "string"
          },
          "permission-message": {
            "description": "Message to send to users if permission checks fail. Occurrences of <permission> are replaced with the `permission` property.",
            "type": "string"
          },
          "usage": {
            "description": "Usage message of the command",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "object"
    },
    "depend": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9 _.-]+$"
          },
          "type": "array"
        },
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9 _.-]+$"
        }
      ],
      "description": "Plugin(s) in `depend` must be present and will be loaded BEFORE this plugin."
    },
    "description": {
      "description": "The detailed description of the plugin",
      "type": "string"
    },
    "extensions": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "additionalProperties": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "object"
        },
        {
          "type": "string"
        }
      ],
      "description": "Extension(s) required to load this plugin. Can be one extension name, a list of extension names or a mapping of extension name to version constraints."
    },
    "load": {
      "description": "The point of loading the plugin, defaults to POSTWORLD",
      "enum": ["POSTWORLD", "STARTUP"],
      "type": "string"
    },
    "loadbefore": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9 _.-]+$"
          },
          "type": "array"
        },
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9 _.-]+$"
        }
      ],
      "description": "Plugin(s) in `loadbefore` will be loaded AFTER this plugin if they are present."
    },
    "main": {
      "description": "The fully-qualified name of the main class that extends PluginBase",
      "pattern": "([A-Za-z_]\\w+\\\\)*([A-Za-z_]\\w+)",
      "type": "string"
    },
    "mcpe-protocols": {
      "anyOf": [
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "type": "integer"
        }
      ],
      "description": "The MCPE protocol versions supported by the plugin. If supported,"
    },
    "name": {
      "description": "Name of the plugin",
      "pattern": "^[A-Za-z0-9 _.-]+$",
      "type": "string"
    },
    "permissions": {
      "$ref": "#/definitions/PermissionChildren",
      "description": "Permissions to be registered by this plugin automatically. Permissions can still be registered dynamically."
    },
    "prefix": {
      "description": "The plugin prefix used in the logger, defaults to plugin name",
      "type": "string"
    },
    "softdepend": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9 _.-]+$"
          },
          "type": "array",
          "pattern": "^[A-Za-z0-9 _.-]+$"
        },
        {
          "type": "string"
        }
      ],
      "description": "Plugin(s) in `softdepend` will be loaded BEFORE this plugin if they are present, but nothing special happens if they are not present."
    },
    "version": {
      "description": "Plugin version",
      "type": "string"
    },
    "website": {
      "description": "The plugin's website",
      "format": "iri",
      "type": "string"
    }
  },
  "required": ["api", "main", "name", "version"],
  "type": "object"
}
