Astral Realms Documentation Help

Built-in Adapters

AstralSync ships with seven adapters registered by default. All keys use the astralsync namespace.

Adapter Reference

Inventory

Field

Value

Class

PlayerInventoryAdapter

Key

astralsync:inventory

Data type

ItemStack[]

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

PlayerEnderchestAdapter

Key

astralsync:enderchest

Data type

ItemStack[]

Saves and restores the player's 27-slot ender chest contents.

Attributes

Field

Value

Class

PlayerAttributeAdapter

Key

astralsync:attributes

Data type

Set<WrappedAttribute>

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

key

Key

Attribute namespaced key

baseValue

double

Base attribute value

modifiers

Set<WrappedAttributeModifier>

Applied modifiers

WrappedAttributeModifier fields:

Field

Type

Description

key

Key

Modifier namespaced key

value

double

Modifier amount

operation

AttributeModifier.Operation

ADD_NUMBER, ADD_SCALAR, or MULTIPLY_SCALAR_1

slotGroup

EquipmentSlotGroup

Slot restriction for the modifier

Persistent Data

Field

Value

Class

PlayerPersistentDataAdapter

Key

astralsync:persistent_data

Data type

byte[]

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

PlayerStateAdapter

Key

astralsync:state

Data type

PlayerStateData

Saves and restores general player state. This is the broadest adapter.

PlayerStateData fields:

Field

Type

Description

gameMode

GameMode

Current game mode

health

double

Current health

healthScale

double

Display scale for the health bar

foodLevel

int

Hunger level (0–20)

saturation

float

Food saturation

exhaustion

float

Food exhaustion

allowFlight

boolean

Whether the player is allowed to fly

flying

boolean

Whether the player is currently flying

experience

float

XP progress toward next level (0.0–1.0)

totalExperience

int

Total XP points

level

int

XP level

fireTicks

int

Remaining fire ticks

freezeTicks

int

Remaining freeze (powder snow) ticks

noDamageTicks

int

Remaining invincibility ticks

enchantmentSeed

int

Seed for enchantment table RNG

Advancements

Field

Value

Class

PlayerAdvancementAdapter

Key

astralsync:advancements

Data type

Map<Key, Set<String>>

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

PlayerPotionAdapter

Key

astralsync:potion_effects

Data type

Set<PotionEffect>

Saves and restores all active potion effects, including duration, amplifier, ambient status, and particle visibility.

Summary Table

Key

Class

Data Type

astralsync:inventory

PlayerInventoryAdapter

ItemStack[]

astralsync:enderchest

PlayerEnderchestAdapter

ItemStack[]

astralsync:attributes

PlayerAttributeAdapter

Set<WrappedAttribute>

astralsync:persistent_data

PlayerPersistentDataAdapter

byte[]

astralsync:state

PlayerStateAdapter

PlayerStateData

astralsync:advancements

PlayerAdvancementAdapter

Map<Key, Set<String>>

astralsync:potion_effects

PlayerPotionAdapter

Set<PotionEffect>

24 April 2026