> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/plugins/plugin-yml.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# plugin.yml

`plugin.yml` is the file that tells the server who your plugin is, what it needs and which commands and permissions it adds. Every plugin jar has one at its root. The server refuses a jar whose file is missing or invalid, and logs every problem.

```yaml
name: Skyglass
version: 1.0.0
main: com.velyorix.examples.skyglass.Skyglass
api-version: "1.0"
author: Aethercube
description: Driftglass from the keels of the floating isles.
load: POSTWORLD
dependencies:
  required: []
  optional: []
permissions:
  skyglass.drifter:
    description: Spawn a Keel Drifter in front of you
    default: op
commands:
  drifter:
    description: Spawns a Keel Drifter a few blocks in front of you
    usage: /drifter
    aliases: [keel]
    permission: skyglass.drifter
```

## Fields

| Field                   | Required | Rule                                                                                                                           |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `name`                  | yes      | `[A-Za-z0-9_-]{1,64}`. Unique among the installed plugins.                                                                     |
| `version`               | yes      | Semantic version `x.y.z`, with an optional `-suffix`.                                                                          |
| `main`                  | yes      | Fully qualified class that extends `JavaPlugin`, outside `com.velyorix.game`. It needs a public constructor without arguments. |
| `api-version`           | yes      | `"1.0"`. Quote it, so YAML keeps it a string.                                                                                  |
| `author`                | no       | Free text.                                                                                                                     |
| `description`           | no       | Free text.                                                                                                                     |
| `load`                  | no       | `STARTUP` or `POSTWORLD`. Default `POSTWORLD`.                                                                                 |
| `dependencies.required` | no       | Plugin names. The plugin is `BLOCKED` when one is missing or failed.                                                           |
| `dependencies.optional` | no       | Plugin names. They only set the load order, when present.                                                                      |
| `permissions`           | no       | Nodes the plugin declares. See below.                                                                                          |
| `commands`              | no       | Commands the plugin may register. See below.                                                                                   |

A plugin cannot depend on itself. A cycle in the dependencies puts the plugins of the cycle in the `ERROR` state.

## `load`

| Value       | `onEnable` runs             | Use it for                                                |
| ----------- | --------------------------- | --------------------------------------------------------- |
| `STARTUP`   | Before the world loads.     | A world generator, which must exist when the world opens. |
| `POSTWORLD` | After the world has loaded. | Everything else.                                          |

## `permissions`

Each key is a permission node: lower-case letters, digits, `_` and `-`, in segments separated by dots, optionally ending in `.*`.

| Field         | Meaning                                                                                                      |
| ------------- | ------------------------------------------------------------------------------------------------------------ |
| `description` | Free text.                                                                                                   |
| `default`     | `true` (everyone), `false` (nobody until granted), `op` (operators) or `not_op` (everyone except operators). |

The server registers these defaults before `onEnable`. See [Operators and permissions](https://docs.aethercube.fr/developers/running-a-server/operators-and-permissions.md) for how a node resolves.

## `commands`

Each key is a command name matching `[a-z0-9_-]{1,32}`. A command must be declared here to be registered from code.

| Field         | Meaning                                                  |
| ------------- | -------------------------------------------------------- |
| `description` | Shown by `/help`.                                        |
| `usage`       | Shown when the command answers with a usage error.       |
| `aliases`     | Other names for the command.                             |
| `permission`  | Node required to run it. Omit it to let everyone run it. |

## Validation

A jar is `INCOMPATIBLE` when `plugin.yml` is invalid, when `api-version` is not supported, when the name is taken, or when a class of the jar is in `java`, `javax`, `jdk` or `com.velyorix.game`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/plugins/plugin-yml.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
