Built-in Adapters
AstralSync ships with seven adapters registered by default. All keys use the astralsync namespace.
Adapter Reference
Inventory
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores the player's 36-slot main inventory (hotbar + main grid). Does not include armor, offhand, or cursor items — those are handled separately by the game.
Ender Chest
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores the player's 27-slot ender chest contents.
Attributes
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores all entity attributes (e.g. max health, movement speed, attack damage) and their modifiers.
Modifiers matching any pattern in ignored-attributes are excluded during save. This prevents transient modifiers from game modes, potion effects, or other plugins from being persisted.
WrappedAttribute fields:
Field | Type | Description |
|---|---|---|
|
| Attribute namespaced key |
|
| Base attribute value |
|
| Applied modifiers |
WrappedAttributeModifier fields:
Field | Type | Description |
|---|---|---|
|
| Modifier namespaced key |
|
| Modifier amount |
|
|
|
|
| Slot restriction for the modifier |
Persistent Data
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores the player's PersistentDataContainer — the NBT-backed key-value store attached to every Bukkit entity. This preserves any custom data written by other plugins via the PDC API.
State
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores general player state. This is the broadest adapter.
PlayerStateData fields:
Field | Type | Description |
|---|---|---|
|
| Current game mode |
|
| Current health |
|
| Display scale for the health bar |
|
| Hunger level (0–20) |
|
| Food saturation |
|
| Food exhaustion |
|
| Whether the player is allowed to fly |
|
| Whether the player is currently flying |
|
| XP progress toward next level (0.0–1.0) |
|
| Total XP points |
|
| XP level |
|
| Remaining fire ticks |
|
| Remaining freeze (powder snow) ticks |
|
| Remaining invincibility ticks |
|
| Seed for enchantment table RNG |
Advancements
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores advancement progress. The map key is the advancement's namespaced key; the value is the set of completed criteria names.
Potion Effects
Field | Value |
|---|---|
Class |
|
Key |
|
Data type |
|
Saves and restores all active potion effects, including duration, amplifier, ambient status, and particle visibility.
Summary Table
Key | Class | Data Type |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|