Events
| Event | Timing/thread | Cancellable | Mutable field | Cancellation/effect |
|---|---|---|---|---|
EmakiItemCreateEvent | After a stack is built, before it leaves the factory; global-region owner | Yes | result | Cancellation discards the stack and public create returns CANCELLED; listeners may replace the returned stack. Current runtime creation supplies no player, so getPlayer() is null. |
ItemRepairEvent | After validation, before charge and durability commit; player owner | Yes | restoreAmount | Cancellation prevents charge and repair. Amount <= 0 suppresses repair. |
ItemSetBonusChangeEvent | After the active equipped-piece count changes; player owner | No | None | Informational fields include old/new active count, total pieces, active thresholds, and trigger. |
ItemStateChangeEvent | After a committed item-state mutation; owner thread that performed the mutation | No | None | Post-notification that cannot be rolled back. Exposes getItem() (a clone), getMutation(), getHolder() (null when no holder was known), and the forwarded getKey(), getOldValue(), getNewValue(), getDelta(). |
ItemStateThresholdEvent | After a committed numeric mutation crossed a configured threshold; owner thread that performed the mutation | No | None | Post-notification that cannot be rolled back. Exposes getItem(), getHolder(), getKey(), getOldValue(), getNewValue(), getThreshold(), getThresholdId(), getDirection() (UP/DOWN), isOnce(), and isRearmed(). |
ItemOperations.create requires global-region ownership so its synchronous creation event is fired before return. Repair events cover the runtime repair services; migration and refresh operations do not invent migration/refresh event classes. There is no ItemUpdateEvent or EquipmentSkillTriggerEvent in the source. The event package is emaki.jiuwu.craft.item.api.event.
ItemStateThresholdEvent only covers numeric keys (INTEGER, LONG, DOUBLE) that have at least one configured threshold; one event is dispatched per crossed threshold, ascending for upward crossings and descending for downward ones. It is not fired for rejected or unchanged mutations, reserved meta. metadata keys, BOOLEAN and STRING keys, numeric keys without configured thresholds, values that stay on the same side of every threshold, a once threshold still latched from an earlier crossing, or state restored verbatim by rebuild preservation.