Astral Realms Documentation Help

Pet Presets

A preset is a named snapshot of the pets a player had active at the moment they saved it. Applying one unequips everything currently active and equips the pets the preset names, so a player who juggles a farming set and a combat set switches between them in one click instead of unequipping and re-equipping pet by pet.

Presets are per-player data, stored alongside the player's pets in PetPlayerData and synced across servers through AstralSync — they are not configuration, and nothing in blueprints/ or config.yml declares them beyond the cap.

Field

Type

Description

uniqueId

UUID

Generated when the preset is created.

name

String

Player-supplied name; unique per player, compared case-insensitively.

petIds

UUID[]

The pets that were active when the preset was created.

Creating, applying and deleting

All three operations are AstralCore actions, so they are driven from menus and dialogs rather than from a command.

Action

Argument

Behaviour

[create-preset] <name>

the preset name

Saves the player's currently active pets under name.

[apply-preset] <preset>

a PetPreset

Unequips every active pet, then equips the preset's pets.

[delete-preset] <preset>

a PetPreset

Removes the preset. The pets themselves are untouched.

create-preset refuses in two cases: the player is already at the maximum-presets cap (preset-limit-reached), or a preset of that name already exists (preset-already-exists). delete-preset reports preset-not-found when the preset is no longer in the player's data.

Applying fires PetUnequipEvent for every pet it deactivates and PetEquipEvent for every pet it activates, so passive effects follow exactly as they do for a manual equip. Any pet that was spawned is despawned as part of being unequipped.

The shipped UI

The bundled pets-main menu drives all three from a presets layout fed by %pets_presets%:

layouts: presets: taint: "presets" provider: "%pets_presets%" items: preset: slots: [ 65, 66, 67, 68, 69 ] material: "written_book" name: "<primary_color><bold>%parameter_preset_name%" lore: - " <text_color>Ce preset contient <secondary_color>%parameter_preset_pets_size% <text_color>familier(s)." taints: [ "presets" ] left-click-actions: - "[apply-preset] %parameter_preset%" - "[refresh]" right-click-actions: - "[open-dialog] preset-delete:preset=%parameter_preset%"

Creation and deletion each go through a bundled dialog in plugins/AstralPets/dialogs/:

Dialog

Purpose

preset-create

Asks for a name in a TEXT input (max 24 characters) and runs [create-preset] %input_name%.

preset-delete

Confirms, then runs [delete-preset] %parameters_preset% on the preset passed in as a dialog parameter.

Placeholders

Placeholder

Type

Description

%pets_presets%

ItemProvider<PetPreset>

Every preset the viewer owns. Player context required.

%preset_id%

UUID

The preset's unique id.

%preset_name%

String

Its name.

%preset_petIds%

UUID[]

The raw pet ids it holds.

%preset_pets%

ItemProvider<Pet>

The viewer's pets that the preset names, resolved against their live data — so a pet that no longer exists simply drops out. Player context required.

Inside a layout fed by %pets_presets%, each entry is exposed as %parameter_preset_*% — see Menu Layouts.

Storage

Presets are appended to the PetPlayerData binary payload after the pets themselves, and the reader treats their absence as an empty list, so player data written before presets existed still loads.

Messages

Key

Placeholders

Sent when

preset-created

%preset_name%

A preset was saved.

preset-already-exists

%preset_name%

A preset of that name already exists.

preset-limit-reached

—

The player is at the maximum-presets cap.

preset-enabled

%preset_name%

A preset was applied.

preset-deleted

%preset_name%

A preset was deleted.

preset-not-found

—

The preset to delete was not found in the player's data. The shipped text references %preset_name%, but the preset is not registered on the container for this message, so that placeholder does not resolve.

Last modified: 25 September 2026