Astral Realms Documentation Help

Placeholders

AstralDungeons registers two placeholder namespaces with AstralCore, one per module. dungeons is a live, in-progress run reader registered globally on the dungeon (Paper) server; data is the claimed-run reader exposed only inside the bridge's reward-claim flow. For the placeholder syntax itself (%namespace_key%, %outer_{inner}%) see Placeholders.

dungeons_* (dungeon server, global)

DungeonsPlaceholders is a ComplexPlaceholder (namespace dungeons) registered once, globally, into RootPlaceholderContainer from the Paper module's onEnable. See the two-module architecture — this namespace only exists on dungeon servers, not on the bridge. Because PlaceholderContainer.placeholder(namespace) falls back to the root container for any namespace it doesn't hold locally, %dungeons_*% resolves from any placeholder container built on that server once a Player context is attached to it — including the ad-hoc containers MobListener and PlayerListener build via AstralPaperAPI.createPlaceholderContainer(player) (loot-item display text, the player-death message). It isn't wired into any shipped default — messages.yml's player-death, won, and lost strings don't reference it — but it's available wherever a config value accepts a placeholder for that player.

Placeholder

Type

Description

%dungeons_experience%

double

The resolving player's live, unclaimed run experience. Reads experience off the DungeonPlayerData held in the dungeon server's in-memory cache (PlayerDataService#get, keyed by player UUID) — that entry is created empty on join when the player's party has an active instance, and accumulates as mobs are killed. Returns null if the placeholder isn't resolving against a Player context, or if that player has no cached DungeonPlayerData (no active instance for their party on this server). See Reward carry-over.

Any sub-key other than experience — including none at all, i.e. bare %dungeons% — resolves to null.

lines: - "<gray>Experience earned so far: <yellow>%dungeons_experience%"

data_* (bridge, reward-claim actions only)

DungeonPlayerData is itself a ComplexPlaceholder (namespace data), but it is never registered into RootPlaceholderContainer%data_experience% is not a globally available placeholder anywhere on the network. Instead, PlayerDataService#claimRewards (bridge module) builds a one-off PlaceholderContainer for the returning player (AstralPaperAPI.createPlaceholderContainer(player)), registers the just-claimed DungeonPlayerData instance into it, and runs the bridge's reward-actions action list (see Configuration) against that container. The placeholder is therefore scoped to that single action run — it only resolves inside reward-actions entries, nowhere else. See Reward carry-over and Loot & Rewards.

Placeholder

Type

Description

%data_experience%

double

The accumulated experience the player earned across their dungeon run, read from the DungeonPlayerData that PlayerDataService#claimRewards loaded from the dungeons:players_data:<uuid> Redis key. The underlying cache entry is deleted after the reward actions run and the queued reward commands are dispatched — see Loot & Rewards for the full sequence.

As with dungeons_experience, any other sub-key (or none) resolves to null. The commands collection also carried by the same DungeonPlayerData (queued commands accumulated from item pickups in the dungeon) is not exposed as a placeholder — claimRewards dispatches those separately from console, after the reward actions run, with %player_name% substituted into each command string.

# Bridge server config.yml reward-actions: - "[message] Tu as win %data_experience% points d'expérience chef !"
Last modified: 25 July 2026