Skip to content

Public API ​

Compile-time dependency ​

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

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

EmakiAttribute embeds these un-relocated API classes; a duplicate copy breaks event and bridge class identity

Availability entry point: EmakiAttributeApi.status().usable(); the non-null layers are catalog(), operations(), and extensions(). install, uninstall, and Bridge are runtime-only

Catalog and operations ​

AttributeCatalog reads player attributes/resources, item and combat snapshots, resource definitions, attribute/damage ids, and item contribution-gate state. Player/entity/live-item methods require the appropriate owner thread. AttributeOperations provides consumeResource, owner-dispatched scheduleEquipmentSync, calculateDamage, applyDamage, and resyncPlayer; all other live combat/player work requires its documented owner thread

Extensions and relocated packages ​

Third-party extension types are under emaki.jiuwu.craft.attribute.api.extension: AttributeContributionProvider, contribution/gate registrations, and ItemContributionGate. Registration is owner-scoped and allowed from any thread; close handles on disable, and a stale handle never removes a replacement registration. Provider/gate callbacks run synchronously on the collection thread; they must return quickly and respect the owner thread of any live Bukkit object in context. extensions().pdc() exposes the PDC access layer. Attribute Bukkit events are under emaki.jiuwu.craft.attribute.api.event, not the root API package

Results ​

Use Success, Partial, Failure, and optionalValue() without collapsing business values into availability. Failure kinds are UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, and INTERNAL_ERROR; no separate disabled kind exists