Public API
Compile-time dependency
<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-gem-api</artifactId><version>2.7.15</version><scope>provided</scope></dependency>repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-gem-api:2.7.15") }Compile only — never install, shade, or relocate this jar
EmakiGem embeds the un-relocated API. A bundled copy breaks Bukkit event and bridge identity.
Use EmakiGemApi.status().usable(), catalog(), and operations(). install, uninstall, and Bridge are internal.
GemCatalog reads states/definitions, identifies gems/openers, checks inlay/extract compatibility, resolves the highest-priority resonance, and aggregates attributes/skills. It is any-thread only while inspected stacks are not concurrently mutated.
Reroll exposes a single read-only entry: catalog().rerollSession(operatorId) returns Optional<GemRerollSessionView>, empty when there is no session, the runtime is unavailable, or operatorId is null. The view carries operationType, originalAffixes, candidateAffixes, stage, version, createdAt, expiryAt, and terminalState, plus open() to test whether it is still in the open terminal state. operations() has no reroll method — candidates can only be generated and confirmed through commands or the GUI — and there are no reroll events.
Player operations require the actor owner thread. inlay and extract return committed GemInlayOutcome/GemExtractOutcome; callers write updatedEquipment back and consume/deliver returned items as the outcome specifies. Their operationId matches the pre-event and eventual completed event. Completed events occur only after configured success actions and persistent journal completion, not merely after commit starts. openSocket returns the updated equipment and adjusts the supplied opener stack on success. createGemItem builds a detached item; clearGems, GUI methods, and live stacks obey ownership.
Use Success, Partial, Failure, and optionalValue(). Failure kinds: UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, INTERNAL_ERROR.