> For the complete documentation index, see [llms.txt](https://docs.marioded.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.marioded.com/api-how-to-guides/examples.md).

# Example gallery

Browse complete integration examples and pick a starting point for your own plugin.

Copy a complete pattern, then adapt it to your game's lifecycle. Each page explains the runtime it needs and includes the Java class to put in your own integration.

These are integration examples, not plugins to install together. They deliberately omit command registration and application-specific match storage.

For a guided first example, follow [Creating your first recording](/api-introduction/first-recording.md). It builds `FirstRecordingPlugin` progressively before the bounded match example below adds arena selection.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Record a match</strong></td><td>Recorder: start bounded capture and handle asynchronous save results.</td><td><a href="/api-how-to-guides/examples/recording-integration.md">Recording a match</a></td></tr><tr><td><strong>Open a replay</strong></td><td>Player: check catalog access, load a recording, and handle playback completion.</td><td><a href="/api-how-to-guides/examples/playback-integration.md">Starting local playback</a></td></tr><tr><td><strong>Add custom controls</strong></td><td>Player: register a menu action and a hotbar item with explicit cleanup.</td><td><a href="/api-how-to-guides/examples/ui-extensions.md">Extending the UI</a></td></tr><tr><td><strong>React to lifecycle events</strong></td><td>Save notifications and playback stop events, with the right threading.</td><td><a href="/api-how-to-guides/examples/replay-notifications.md">Handling notifications</a></td></tr><tr><td><strong>Record a milestone</strong></td><td>A shared custom payload, its codec, recorder insertion, and player renderer.</td><td><a href="/api-how-to-guides/examples/milestone.md">Recording a milestone</a></td></tr></tbody></table>

{% hint style="info" %}
**New to the API?** Complete [Setting up](/api-introduction/getting-started.md) first. Examples are integration building blocks rather than ready-to-install plugins.
{% endhint %}

Use Java 21 and add the matching public API from Maven Central as shown in [Setting up](/api-introduction/getting-started.md). Declare the needed runtime plugin names in your integration descriptor. Do not eagerly load role-specific bindings on a server that lacks that role.

Everything needed to understand each example is included on its page. You do not need access to Reverse's implementation to use it.

Important adaptation points:

* Store recording IDs in your own match state and stop sessions on every match teardown path.
* Add overlapping-request cancellation/identity handling to a real asynchronous Watch UI.
* Confirm the hotbar slot is free and your namespace does not replace another extension.
* Allocate codec IDs deliberately; register once per runtime service, before use/load.
* Keep callbacks short; a compile check does not simulate a Bukkit server or validate game-specific behavior.


---

# 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.marioded.com/api-how-to-guides/examples.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.
