Extension file format
Define fields and command templates in shareable YAML or JSON.
Start with an example
YAML and JSON use the same schema. Define a plugin, a stable extension ID and one or more named actions. Each action can contain fields and command templates. The example gives a buyer in-game money through EssentialsX; install the matching plugin before using it.
schemaVersion: 1
id: essentials-economy
name: EssentialsX Economy
version: 1.0.0
plugin: EssentialsX
actions:
- id: deposit
name: Give money
fields:
- id: amount
label: Amount
type: number
default: "100"
min: 1
commands:
- eco give {username} {amount}
runAs: console
requireOnline: falseDefinition and action properties
The definition requires schemaVersion: 1, id, name, version, plugin and actions. description is optional. Extension IDs use lowercase letters, digits and hyphens, begin with a letter, and can be at most 40 characters. Keep an ID stable when sharing updates.
Each action requires id, name and commands. description and fields are optional. runAs can be console (the default) or player. requireOnline defaults to false; player actions always wait for the player.
A field needs id, label and type. Optional properties are description, placeholder and default. Defaults and select option values must be strings, even for number fields. Every field is required when configuring a package action.
Field types
| Type | Use |
|---|---|
| token | One argument without spaces. Letters, digits, _ . : * + / @ - are accepted. |
| text | Single-line text. Spaces are allowed; quote the placeholder if the plugin syntax needs it. |
| number | A finite decimal. Optional min and max bounds. |
| select | A choice from options: [{ value: "true", label: "Allow" }]. |
| duration | Positive duration components using s m h d w M y, such as 30d or 1d12h. |
Placeholders and limits
Use {username} for the buyer. Other placeholders must match a declared field ID exactly, such as {amount}. The username ID is reserved. Unknown properties, undeclared placeholders, control characters, YAML aliases and custom tags are rejected. There is no executable validation code or script support.
Commands must be single lines without leading slashes. Field values cannot contain braces or control characters. Craftly validates the selected action against your store’s enabled definition when saving the package.
| Resource | Limit |
|---|---|
| File size / saved extensions | 128 KB / 50 per store |
| Actions / fields | 30 per extension / 12 per action |
| Commands / characters | 1–5 per action / 300 per template and compiled command |
| Field value | 200 characters |
| Package | 20 action rows / 100 compiled commands |