English
Events API
Forge events live in emaki.jiuwu.craft.forge.api.event. Both are synchronous Bukkit events fired on the forging player's owner thread, and both the GUI forge path and the public ForgeOperations.forgeAsync share the same event contract
| Event | Timing | Thread | Cancellable | Mutable field | Cancellation / outcome | Runtime paths |
|---|---|---|---|---|---|---|
ForgeStartEvent | After validation and the prepared forge complete, just before asynchronous execution and material commit | Player owner thread | Yes | successRate; finite values clamp to 0–100, non-finite values become 0 | Cancelling stops the attempt without scheduling execution and without consuming materials; the API returns CANCELLED | GUI confirmation and forgeAsync |
ForgeCompletedEvent | After a forge result has been resolved, for both successful and resolvable failed attempts | Player owner thread | No | None | Post notification, cannot be rolled back | GUI completion and forgeAsync completion |
ForgeStartEvent exposes the player, recipe id, and first-craft flag as read-only values. ForgeCompletedEvent exposes success, result item, quality, and multiplier as read-only values; on failure the result item and quality may be empty
When owner or generation validation fails before the start, no start event is fired. During completion, if the player's owner scheduling has already retired, the result is still mapped and settled but the completed event can be skipped. A cancelled start produces no completed event. Catalog validation, opening the GUI or recipe book, and refreshing items are not themselves forge attempts