GUI Storage Artifact
The GUI Storage Artifact persists items placed in storage slots across sessions and server restarts. Each slot in the layout can reference this artifact to save/load items. Type:Artifact Entry
Entry ID: gui_storage
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
artifactId | String | auto-generated | Unique identifier for this storage instance. |
Stored Data
Each artifact stores a JSON map pergroupKey (player UUID or group ID), where keys are slot indices and values are Base64-encoded item data.
Data structure:
Usage
- Create a
gui_storageentry in your page - Reference it from storage slots via
storage.entry - Items are automatically persisted when placed/taken
Storage Slot Configuration
When used in anopen_gui layout, each slot can have:
| Field | Type | Default | Description |
|---|---|---|---|
entry | Ref<gui_storage> | required | Reference to the GUI Storage artifact |
maxAmount | Int | 64 | Maximum item stack size in this slot |
forceStorage | Bool | true | Allow non-stackable items (swords, tools) |
temporary | Bool | false | Items are lost when the menu closes |
group | Ref<GroupEntry> | null | Group for shared storage (e.g., islands) |
placeholder | Var<Item> | AIR | Item shown when the slot is empty |
requiredItem | Var<Item> | null | Only allow this specific item type |
requiredAmount | Int | 0 | Amount needed to trigger onReachRequired |
onFill | Ref[] | [] | Triggers when slot becomes non-empty |
onEmpty | Ref[] | [] | Triggers when slot becomes empty |
onReachRequired | Ref[] | [] | Triggers when requiredAmount is reached |
consumeOnReach | Bool | true | Consume deposited items when requiredAmount is met |
Storage Placeholders
These placeholders are resolved in storage slotdisplayName and lore at render time:
| Placeholder | Description |
|---|---|
{stored_name} | Display name of the stored item (empty if slot is empty) |
{stored_amount} | Current item count in the slot |
{stored_max} | Maximum capacity (64, 10, etc.) |
Group-Based Storage
Use thegroup field to share storage between multiple players:
Accumulation Mode
SetrequiredItem and requiredAmount to create a progress-based storage slot:
onReachRequired triggers fire, and items are consumed (if consumeOnReach is true). A progress bar appears in the item lore.