> For the complete documentation index, see [llms.txt](https://matt-creppet.gitbook.io/matt-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://matt-creppet.gitbook.io/matt-docs/compatibility.md).

# Compatibility and integration

## Platform approach

Regen Zone compiles against the shared Spigot 1.20 API and avoids internal Minecraft server classes. Paper and Purpur compatibility is an intended result of using that common API. Purpur documents support for Bukkit, Spigot and Paper plugins in its [official FAQ](https://purpurmc.org/docs/purpur/faq/).

The target range is Minecraft 1.20–26.3. Automated tests use selected Spigot APIs, including the endpoints of that range. These tests verify logic and API resolution; they do not replace running the plugin in real Spigot, Paper and Purpur servers with clients. See `VERIFICACION.md` for the exact release test results and remaining manual checks.

No duel-plugin dependency or match-end detection is included. If another plugin can execute a command when an activity ends, its administrator may configure it to execute `rz regen <arena>`. Regen Zone does not assume that such a plugin exists.

## Other protection plugins

Regen Zone's change listeners observe successful events at MONITOR priority with cancelled events ignored. Its protection listeners cancel covered actions where necessary; they do not intentionally re-enable events cancelled by another plugin.

World restoration is a server-side block write. It is not a player placement and does not naturally run every other plugin's player-placement checks. Installing a region-protection plugin does not automatically grant it a veto over restoration. Use the integration event below if your integration needs that control.

Plugins that directly modify the world can bypass ordinary Bukkit events. Those changes may not be tracked by selective modes. A full interval or manual restoration can compare the whole saved area.

## Cancellable block restoration event

The plugin JAR exposes:

```java
dev.regenzone.api.BlockRestoreEvent
```

The event fires synchronously immediately before an actual block write, after Regen Zone's material and player-safety checks. It is not emitted for blocks that already match or are excluded. It provides:

* `getArenaName()` — the arena identifier.
* `getBlock()` — the world block about to be changed.
* `getTargetData()` — a clone of the intended saved block state.
* `isCancelled()` and `setCancelled(boolean)`.

Example listener in another plugin:

```java
import dev.regenzone.api.BlockRestoreEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

public final class ArenaIntegration implements Listener {
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void beforeRestore(BlockRestoreEvent event) {
        if (event.getArenaName().equals("practice") && isArenaReserved()) {
            event.setCancelled(true);
        }
    }

    private boolean isArenaReserved() {
        // Replace with your plugin's own reservation check.
        return false;
    }
}
```

Declare `depend: [RegenZone]` if the integration cannot operate without it. With `softdepend: [RegenZone]`, check that Regen Zone is enabled before loading/registering the listener class that references its API. Compile against the Regen Zone JAR as `compileOnly`; do not shade a second copy of its event classes into your plugin.

Cancellation prevents that write attempt and keeps the position pending. Selective modes postpone it before retrying; full interval mode revisits it during subsequent cycles. A permanent veto can leave permanent pending work. Keep event handlers fast: they run on the main server thread inside restoration processing.

There is no player actor associated with this event. Your integration must decide its own region, ownership or match rules from the arena and block location. The event does not expose asynchronous world access.

## Snapshot boundaries

Normal block type and `BlockData` properties are saved. Block entities represented by Bukkit `TileState` are deliberately not serialized: containers, signs, spawners and similar blocks may contain data that cannot safely be reconstructed from `BlockData` alone.

Positions containing these special blocks during capture are permanently skipped by that snapshot. Special blocks placed later are also preserved rather than overwritten. If an original special block is destroyed, this plugin does not rebuild its inventory or other data.

Entities, armor stands, paintings, dropped items, inventories, biome data and other plugins' metadata are not restored. Block writes suppress immediate physics to reduce intermediate collapse; later game ticks can still update liquids, gravity blocks and redstone.

Do not move snapshots between worlds or Minecraft versions without a tested migration procedure. The format stores a world UUID and version-specific block-state strings. It has no built-in world or material migration engine.


---

# 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://matt-creppet.gitbook.io/matt-docs/compatibility.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.
