Astral Realms Documentation Help

Placeholders

AstralPunishments registers one placeholder namespace, punishment, backed by PunishmentPlaceholder (paper/placeholder/PunishmentPlaceholder, a ComplexPlaceholder). It is not globally registered — an instance only becomes resolvable once a PunishmentEntity is placed into scope, which today happens exclusively inside the history menu flow (MenuService#openHistory wraps each PunishmentEntity from history in a PunishmentPlaceholder before opening the menu). For the placeholder syntax itself (%a_b_c%, chaining, $e(...)) see Placeholders.

punishment_*

Placeholder

Type

Description

%punishment_id%

UUID

The punishment's uniqueId.

%punishment_type%

PunishmentType

BAN, IPBAN, MUTE, KICK, or WARN.

%punishment_icon%

ItemStackWrapper

The type's icon from display.yml (display().icons().get(type)).

%punishment_player%

MinecraftPlayerPlaceholder

The target, chainable into any player_*-style sub-key.

%punishment_operatorId%

UUID

The issuing operator's id, or null for console.

%punishment_operatorName%

String

The issuing operator's name, or "Console" if null.

%punishment_reason%

String

The punishment's reason, or "Aucune" (French for "none") if unset.

%punishment_createdAt%

TimePlaceholder

When the punishment was issued — chain _format for a rendered date/time.

%punishment_expiresAt%

TimePlaceholder

When it expires, or null if isPermanent().

%punishment_duration%

String

"Permanent", or the human-readable span between createdAt and expiresAt (DurationParser.toHumanReadable).

%punishment_status%

String

"Révoquée" (pardoned) / "Expirée" (lapsed) / "Active" — French, mirroring the paper messages.yml locale.

%punishment_active%

boolean

The raw active column.

%punishment_expired%

boolean

isExpired() — active is true but past expiresAt.

%punishment_permanent%

boolean

isPermanent()expiresAt is null or -1.

%punishment_pardonable%

boolean

true only when active && !expired and type is BAN, IPBAN, or MUTE — gates the Pardon button in the detail menu.

%punishment_removedById%

UUID

Who pardoned it, or null if still active/never pardoned.

%punishment_removedByName%

String

Pardoner's name, or "Inconnu" ("unknown") if null.

%punishment_removedAt%

TimePlaceholder

When it was pardoned, or null if never pardoned.

%punishment_removedReason%

String

The pardon reason, or "Aucune" if unset.

Where these are consumed

File

Usage

menus/punishments/history.yml

Row icon (copy-from: "%parameter_punishment_icon%"), lore (reason, operatorName, createdAt_format, duration, status), and the click action [open-menu] punishment-detail:punishment=%parameter_punishment%:....

menus/punishments/detail.yml

Full info block; view-requirements gating the Retrait (revocation) block on %parameters_punishment_active% == false and the Pardon button on %parameters_punishment_pardonable% == true.

menus/punishments/confirm-pardon.yml

Confirmation summary; [pardon-punishment] %parameters_punishment_id% %parameters_target_uuid% action.

See Punishment History GUI for how punishment enters menu scope via the punishments layout taint vs. the parameters_punishment open-parameter, and the [pardon-punishment] action that consumes %punishment_id% directly.

Last modified: 25 July 2026