Skip to content

Public API

Compile-time dependency

xml
<repositories><repository><id>emaki-public</id><url>https://repo.crypticlib.com/repository/maven-public/</url></repository></repositories>
<dependency><groupId>emaki.jiuwu.craft</groupId><artifactId>emaki-level-api</artifactId><version>1.5.8</version><scope>provided</scope></dependency>
kotlin
repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-level-api:1.5.8") }

Compile only — never install, shade, or relocate this jar

The runtime embeds these API classes; duplicates invalidate event and bridge class identity.

Use EmakiLevelApi.status().usable(), catalog(), operations(), and extensions(). install, uninstall, and Bridge are internal.

LevelCatalog is any-thread for types, in-memory progress, requirements, ranking, previews, and loadPlayerDataAsync(UUID). The load future uses EmakiLevel's asynchronous store and its completion thread is unspecified; marshal later Bukkit work yourself. LevelOperations is synchronous and target-player owner-thread only: exp/level mutations, reset, player sync, and GUIs return LevelOperationResult or EmakiResult<Unit>.

extensions().registerExpSource(owner, provider) is the owner-scoped third-party experience source point. Provider registration may occur on any thread; its handle is idempotently closeable.

Success, Partial, Failure, and optionalValue() distinguish outcomes. Failure kinds are UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, INTERNAL_ERROR.