Setting up
This page shows how to add the Reverse API to a Java 21 Bukkit plugin project. We will use the recorder for our first integration; the same discovery pattern applies to player and lobby.Choose your API artifact
Choose the artifact for the role your integration will run on. Your build tool resolves its shared API dependencies automatically.
Add the dependency
Add the public API from Maven Central. ReplaceREVERSE_VERSION below with the published API version compatible with the Reverse release installed on your server.
- build.gradle.kts
- build.gradle
- pom.xml
Do not shade the API into your plugin. Reverse supplies these classes at runtime. A second copy can break service lookup and event class identity.
api-recorder with the appropriate artifact from the table. Use com.marioded.reverse:api or com.marioded.reverse:api-gui only when your library specifically needs those shared contracts without a role-specific entry point.
Declare the runtime dependency
Add the actual Bukkit plugin name to your integration’s descriptor:reverse-player or reverse-lobby for the corresponding integration. This makes Bukkit load your plugin after the required role. A jar being present does not guarantee its runtime initialized successfully, so we will still check discovery.
If your whole plugin should work without Reverse, use an isolated optional integration and softdepend. An optional descriptor alone does not make eager references to absent API classes safe. See lifecycle handling.
Discover the active runtime
In your plugin’sonEnable, ask the recorder entry point for its provider:
ReverseRecorder.get() returns an Optional from Bukkit’s ServicesManager. If no provider was registered, the Optional is empty. Do not create a replacement implementation yourself.
For the other roles, use the same pattern with ReversePlayer.get() or ReverseLobby.get().

