Documentation / 26.2
Docs/sourbyapi

sourbyapi

The plugin API artifact: the Paper API surface under the SourbyCraft group id, region-threading additions, and a read-only metrics contract.

sourbyapi is the artifact a SourbyCraft plugin compiles against. It republishes the Paper API under the SourbyCraft group id and adds the region-threading API and a read-only metrics service. It is not a reimplementation of the upstream APIs.

What it is

  • Upstream Paper public API classes keep their org.bukkit.* and io.papermc.paper.* names.
  • Region-threading additions live in dev.iyanz.sourbycraft.api.{event,region,simd,world} plus Unsupported.
  • The read-only metrics contract lives in dev.iyanz.sourbycraft.api.metrics.
  • Group id: dev.iyanz.sourbycraft; artifact: sourbyapi.

Build 48 changes

The inherited Canvas API package moved from io.canvasmc.canvas todev.iyanz.sourbycraft.api. The old package was removed with no shim. A plugin compiled against it fails to link when a class touching the old package loads; rebuild against the new artifact. Class names and semantics are unchanged.

io.canvasmc.canvas.Unsupporteddev.iyanz.sourbycraft.api.Unsupported
io.canvasmc.canvas.WorldUnloadResultdev.iyanz.sourbycraft.api.world.WorldUnloadResult
io.canvasmc.canvas.event.*dev.iyanz.sourbycraft.api.event.*
io.canvasmc.canvas.region.*dev.iyanz.sourbycraft.api.region.*
io.canvasmc.canvas.simd.*dev.iyanz.sourbycraft.api.simd.*

ServerBuildInfo.BRAND_CANVAS_ID was also removed. UseServerBuildInfo.BRAND_SOURBYCRAFT_ID. Plugins using only Bukkit/Paper/Folia API are unaffected by the package move.

Coordinates

artifact
group:    dev.iyanz.sourbycraft
artifact: sourbyapi
version:  26.2-REL   # 26.2-DEV on the development branch

The runtime Bukkit API version is separate: plugins declareapi-version: '26.2' in their descriptor. The artifact version carries the release channel, and /ver reports the same channel.

Consuming it

Inside the repository, reference the Gradle project directly. External projects use the Maven Local artifact:

build.gradle.kts
dependencies {
    compileOnly("dev.iyanz.sourbycraft:sourbyapi:26.2-REL")
}
No public Maven repositoryNo public Maven repository publishes sourbyapi. JitPack cannot build it because settings evaluation requires the private SourbyPatcher toolchain. External consumers build it with ./gradlew :sourbyapi:publishToMavenLocal on a machine with the pinned toolchain.

Metrics service

The metrics service is a process-wide, read-only accessor. Snapshots and their window values are immutable and may be read safely from any thread. The window aggregates spatial region generations; the global window measures the global scheduler separately and does not affect active-region counts.

ServicesManager · lookup
ServicesManager services = Bukkit.getServicesManager();
SourbyMetrics metrics = services.load(SourbyMetrics.class);

var snapshot = metrics.snapshot();
// Immutable; safe to read from any thread.

Distribution boundary

  • sourbyapi is a compile-time API artifact; it is not a public plugin marketplace or a mod loader.
  • It does not make Fabric or Forge mods compatible. Use SourbyMods for native server mods.
  • Plugins that assume one main thread still need region-aware changes or the compatibility bridge.
  • The API is versioned with the runtime. Do not mix a Build 48 plugin artifact with an older package.

Continue

Read Regions for scheduling and ownership, orObservability for the metrics service in context.