What add-ons are
#Add-ons extend MirageRoster without touching it. An add-on is a jar in plugins/MirageRoster/addons/ with a mirage-addon.yml inside. Add-ons talk to MirageRoster only through its add-on API, each one in its own class loader, and every call into them is timed and guarded.
Installing an add-on
#- Put the add-on jar into
plugins/MirageRoster/addons/. - Run
/mirage addon reload. - Check it with
/mirage addon listand/mirage addon info <id>. - Approve it with
/mirage addon approve <id>(unless it is signed by a publisher you trust, see below).
Managing add-ons needs mirageroster.addon.
| Command | Description |
|---|---|
/mirage addon list | Every add-on found, running or not, and why a stopped one is stopped. |
/mirage addon info <id> | Authors, status, capabilities asked for and granted, trust, watchdog health, file and its SHA-256. |
/mirage addon approve <id> | Trusts this exact file and lets it run. |
/mirage addon revoke <id> | Withdraws the approval. |
/mirage addon enable <id> / disable <id> | Starts or stops an add-on. |
/mirage addon reload | Re-scans the folder and reloads add-ons. |
/mirage addon <id> <args> | Runs the add-on's own command, if it has one. |
Trust
#Nothing runs until it is trusted. Java cannot sandbox code inside one server, so trust is the real protection:
- an operator approves the exact file: its SHA-256 is recorded in
addons/trust.yml, and an update of the add-on must be approved again; or - the jar carries a signature (a
.sigfile next to the jar) from a publisher listed inaddons.trusted-publishers.
Configuration
#| Key | Default | Description |
|---|---|---|
addons.enabled | true | Load add-ons at all. |
addons.trust | "approve" | approve: an add-on runs only once approved or signed by a trusted publisher. open: everything in the folder runs; only for a private test server. |
addons.trusted-publishers | [] | Ed25519 public keys whose signed add-ons load without manual approval. |
addons.watchdog.slow-call-ms | 50 | A main-thread call slower than this counts as slow. |
addons.watchdog.max-errors-per-minute | 10 | Errors within one minute before the add-on is disabled. |
addons.watchdog.max-slow-calls-per-minute | 20 | Slow calls within one minute before the add-on is disabled. |
When the watchdog disables an add-on, everything it registered is undone.
AI requests made by add-ons count toward ai.limits.requests-per-minute.
Signed add-ons
#A signed add-on ships with a .sig file next to its jar. To let a publisher's add-ons load without a manual approval, add that publisher's Ed25519 public key to addons.trusted-publishers and run /mirage addon reload. Everything else still needs /mirage addon approve <id>.
Found a mistake or something missing? Open a ticket on Discord.
Report an issue