Skip to content

Events ​

Item currently has five public events; the source contains no ItemUpdateEvent or EquipmentSkillTriggerEvent, so verify the class name before you reference one. Event package: emaki.jiuwu.craft.item.api.event

EventTimingThreadCancellableMutable fieldCancellation/effectRuntime path
EmakiItemCreateEventAfter the factory has built the stack, before it returns to the callerglobal-region owner threadYesresult, which must be non-nullCancellation discards the result; public create returns CANCELLEDCreation paths that enter EmakiItemFactory and currently own the global region
ItemRepairEventAfter repair validation, before charging and restoring durabilityplayer owner threadYesrestoreAmountCancellation prevents both charging and repair; <= 0 also suppresses the repairThe material and economy repair services, including the economy path of the public repair()
ItemSetBonusChangeEventAfter the active set count has actually changedplayer owner threadNononePost-notification, not rollbackableEquipped set refresh, once per changed set id
ItemStateChangeEventAfter an item-state mutation has been committedthe owner thread that performed the mutationNononePost-notification, not rollbackableThe set/add/remove commit paths of state()
ItemStateThresholdEventAfter a numeric item-state mutation crossed a configured thresholdthe owner thread that performed the mutationNononePost-notification, not rollbackableOnce per crossed threshold, after the commit and the once-threshold re-arm bookkeeping

Boundary conditions: the creation event currently has a null player. When the calling thread does not own the global region, the runtime skips the creation event and still returns the detached build result, so this event is not a complete audit stream for every ItemStack creation. Migration and ordinary refresh dispatch no dedicated public events. ItemSetBonusChangeEvent is a post event; cancellation has no effect

Field contract: ItemStateChangeEvent exposes getItem() (a clone), getMutation(), getHolder() (null when the holder was unknown), and the getKey(), getOldValue(), getNewValue(), and getDelta() forwarded from the mutation

Field and dispatch boundary: ItemStateThresholdEvent exposes getItem(), getHolder(), getKey(), getOldValue(), getNewValue(), getThreshold(), getThresholdId(), getDirection() (UP/DOWN), isOnce(), and isRearmed(). It only covers numeric fields with configured thresholds (INTEGER, LONG, DOUBLE); an upward crossing dispatches once per threshold in ascending order and a downward crossing in descending order. It never fires for rejected or unchanged mutations, reserved meta. metadata keys, BOOLEAN and STRING fields, numeric fields without configured thresholds, changes that stay on the same side of a threshold, a once threshold still latched, or state restored verbatim by a rebuild