{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/pocketmine-plugin-yml/latest.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/pocketmine-plugin.json",
    "sourceSha256": "b79a299d1b3657ad282d7d6e5ac2b695883be70201c95f4c6f2aa6d0a757c2b9",
    "fileMatch": [
      "plugin.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "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.",
      "type": "object",
      "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"
      }
    },
    "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"
        },
        {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              }
            ]
          }
        },
        {
          "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": "#/$defs/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"
  ],
  "$defs": {
    "PermissionChildren": {
      "type": "object",
      "additionalProperties": {
        "properties": {
          "children": {
            "$ref": "#/$defs/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"
      }
    },
    "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"
    }
  },
  "additionalProperties": {},
  "id": "https://json.schemastore.org/pocketmine-plugin.json"
}
