# Developer Overview
Recap-API is a lightweight module that lets other plugins start recordings, trigger playback, manage scenes, and route their own server→client effects through Recap's capture/replay pipeline. The API is available after Recap has been enabled.
---
## Maven / Gradle
Hosted on JitPack. Add as `compileOnly` / `provided` so Recap isn't shaded into your plugin jar.
**Repository:**
*Gradle (Kotlin DSL):*
```kotlin
repositories {
maven("https://jitpack.io")
}
```
*Maven:*
```xml
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
```
**Dependency:**
*Gradle (Kotlin DSL):*
```kotlin
compileOnly("com.github.Lodestones:Recap-API:1.0.10")
```
*Maven:*
```xml
<dependency>
<groupId>com.github.Lodestones</groupId>
<artifactId>Recap-API</artifactId>
<version>1.0.10</version>
<scope>provided</scope>
</dependency>
```
Add `Recap` as a dependency in your `paper-plugin.yml`:
```yaml
dependencies:
server:
Recap:
load: BEFORE
required: true
join-classpath: true
```
---
## Accessing the API
```java
import gg.lode.recap.api.IRecap;
import gg.lode.recap.api.RecapAPI;
IRecap recap = RecapAPI.get();
```
`RecapAPI.get()` returns the registered `IRecap` instance. Returns `null` if Recap hasn't loaded yet — guard accordingly during your own plugin startup.
---
## Manager API surface
`IRecap` exposes two managers plus the captured-packet allowlist:
```java
IRecordingManager recordings = recap.getRecordingManager();
ISceneManager scenes = recap.getSceneManager();
// Allowlist your plugin's outbound packet types so they get captured
// into active recordings and replayed during playback.
recap.capturePacketType("SOUND_EFFECT");
recap.capturePluginMessageChannel("yourplugin:effect_channel");
```
Full type-by-type docs:
- [[Recap/API/IRecap]]
- [[Recap/API/IRecordingManager]]
- [[Recap/API/ISceneManager]]
- [[Recap/API/IRecordingSession]]
- [[Recap/API/RecapAPI]]
---
## Common Integration Patterns
### Start a recording from your plugin
```java
IRecordingManager mgr = recap.getRecordingManager();
mgr.startRecording(player, "minigame_run_" + player.getName());
```
### Stop and persist
```java
mgr.stopRecording(player);
```
### Trigger a scene playback
```java
ISceneManager scenes = recap.getSceneManager();
scenes.playScene("arena_replay", arenaLocation);
```
### Make your effects replayable
If your plugin sends custom server→client packets — sounds, plugin messages for client mods, particle bursts — call `capturePacketType` / `capturePluginMessageChannel` once at startup. Recap then captures the bytes during active recordings and re-emits them at the same tick during playback.
See [[Recap/Developers/Packet Capture]] for the allowlist semantics, rate limiting, and gotchas.
---
## Deeper Topics
- [[Recap/Developers/Recording Format]] — binary stream layout, delta encoding, action type tags
- [[Recap/Developers/Packet Capture]] — packet-allowlist API and replay semantics
- [[Recap/Developers/Hijack Architecture]] — NMS ServerPlayer + FakeConnection internals