Integrate the Obsidrel API into your plugin
You want a Paper plugin to give a configured Obsidrel item to a player. You do not need to read YAML files or implement a new item factory. Use the public provider and item service.
Requirements and dependency
Java 21, a compatible Obsidrel Core and API level 1. For Maven, use the official artifact and a version matching your public API build:
<dependency>
<groupId>io.github.antzbr</groupId>
<artifactId>ObsidrelAPI</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
For Gradle: compileOnly("io.github.antzbr:ObsidrelAPI:1.0.0"). Confirm the exact published version in Maven Central before building.
Retrieve the service safely
import me.antzbr.obsidrel.api.ObsidrelPlatform;
import me.antzbr.obsidrel.api.ObsidrelProvider;
import org.bukkit.inventory.ItemStack;
ObsidrelPlatform api = ObsidrelProvider.require(1);
ItemStack ruby = api.items().create("obsidrel:ruby", 1);
This is a method example, not an entire plugin entry-point. Call it after both plugins are enabled, in the correct Bukkit thread. The resource ID must already exist in Obsidrel. Check API level compatibility before enabling optional features.
Handle an optional dependency
if (ObsidrelProvider.isAvailable() && ObsidrelProvider.supports(1)) {
ObsidrelPlatform api = ObsidrelProvider.get();
// Use documented API methods here.
}
In plugin.yml, declare your dependency or soft dependency on Obsidrel as appropriate; do not shade ObsidrelAPI into your JAR. If the provider is missing, check load order, API version and Core startup logs.