Inventory Manager & Snapshots
Inventory Manager & Snapshots
Applies to: Nord Inventory v2.0.0
Source of truth
The v2.0.0 manager has one strict rule:
- online player: authoritative
InventoryCoreruntime state; - offline player:
nord_inventory_storage.
A connected player is never silently edited from stale SQL. Legacy persisted keys for a connected owner are redirected to that owner's current live inventory key. Online players are listed first and duplicate stale storage rows are hidden.
Live updates
While an inventory is selected in Admin Studio, normal inventory watcher updates refresh the manager without destroying the visible snapshot list. Subscriptions are removed when the tab/Studio closes and automatically expire after Config.Operations.LiveManagerWatchSeconds.
Admin edits
Add/remove/clear operations create a safety snapshot first when AutoSnapshotBeforeAdminEdit = true. If persistence fails, the live mutation is rolled back in memory instead of leaving runtime and SQL inconsistent.
Snapshots
Snapshots store inventory key/type/owner, slot and weight limits, the item payload, reason, creator and timestamp. Connected-player snapshots serialize current live state.
A restore:
- requires
restore_snapshots; - creates a pre-restore safety snapshot;
- restores the selected payload;
- targets the canonical live key when the owner is online;
- refreshes that player's inventory session immediately.
Retention is controlled with Config.Operations.SnapshotRetentionDays.