Events
All four are synchronous cancellable pre-transaction events on the storage owner's entity thread. Item values are defensive snapshots and event business fields are read-only.
| Event | Timing | Cancellation effect |
|---|---|---|
StorageDepositEvent | Immediately before inventory removal and entry-table mutation | Aborts the whole transaction; inventory and storage remain unchanged. |
StorageWithdrawEvent | Before the stored entry is debited | Aborts the whole transaction; stored amount remains unchanged. |
StorageUnlockEvent | After price calculation, before currency/item charge and slot addition | Prevents payment and purchased-slot addition. |
StorageBatchEvent | Before an atomic batch is committed, ahead of any escrow debit or write | Aborts the whole batch. Per-op deposit and withdraw events are deliberately not fired inside a batch. |
Accessors are record-style without a get prefix. Deposit and withdraw carry playerId(), template(), requestedAmount() and source() (gui / command / api / action), and withdraw adds storedAmount(). StorageUnlockEvent carries slotAmount(), purchasedSlotsBefore(), currencyCost() (currency only — an item price is not reflected in this event) and source(). StorageBatchEvent carries ops(), allOrNothing() and source(). Administrative grantSlotsAsync does not fire StorageUnlockEvent.
These events are emitted by the runtime transaction paths. No synthetic event is published when the bridge is unavailable; the future-returning facade operations report explicit result failures.