Astral Realms Documentation Help

Menu Actions

Actions are executable operations attached to items, menus, and dialog buttons. They are written as strings following the format:

[action-id] <argument> <param=value> ...

Global optional parameters available on every action:

Parameter

Type

Description

delay

int (ticks)

Wait this many ticks before executing. 20 ticks = 1 second.

chance

float (0–100)

Probability percentage the action fires. Default 100.

actions: LEFT: - "[sound] minecraft:ui.button.click <delay=5>" - "[message] <green>Lucky! <chance=25>"

All argument strings support %placeholder% substitution resolved through the menu's placeholder context.

Command Actions

console

Executes a command as the console (server operator).

- "[console] give %player.name% diamond 1"

player

Executes a command as the clicking player.

- "[player] warp spawn"

Player Actions

message

Sends a chat message to the player. Supports MiniMessage formatting.

- "[message] <green>Welcome, %player.name%!"

actionbar

Displays a message in the player's action bar.

- "[actionbar] <yellow>You have %player.health% HP"

sound

Plays a sound to the player. Format: namespace:key optionally followed by volume and pitch.

- "[sound] minecraft:ui.button.click" - "[sound] minecraft:block.note_block.pling 1.0 2.0"

connect

Transfers the player to another server (via BungeeCord/Velocity plugin messaging channel).

- "[connect] survival-1"

Inventory Actions

close

Closes the player's currently open inventory.

- "[close]"

open-menu

Opens a menu by its ID. Parameters can be passed with :key=value syntax separated by colons.

- "[open-menu] shop" - "[open-menu] profile:tab=stats:player=%player.name%"

Parameters become available as %param.key% placeholders in the opened menu.

refresh

Fully recomputes the current menu (re-evaluates all variables, requirements, and items).

- "[refresh]"

refresh-slot

Recomputes a single slot index.

- "[refresh-slot] 22"

refresh-layout

Recomputes a named layout instance.

- "[refresh-layout] items"

next-page

Advances the named layout to the next page.

- "[next-page] items"

previous-page

Returns the named layout to the previous page.

- "[previous-page] items"

first-page

Resets the named layout to page 0.

- "[first-page] items"

Variable Actions

set-variable

Sets or updates a menu variable. The value supports arithmetic and ternary expressions.

- "[set-variable] page 0" - "[set-variable] count %var.count%+1" - "[set-variable] mode %var.mode% == shop ? pvp : shop"

See Variables for the full expression syntax.

Action Summary Table

ID

Argument

Description

console

command string

Run command as console

player

command string

Run command as player

message

MiniMessage text

Send chat message

actionbar

MiniMessage text

Send action bar message

sound

namespace:key [vol] [pitch]

Play sound

connect

server name

Transfer to server

close

Close inventory

open-menu

id[:key=val…]

Open menu with params

refresh

Recompute full menu

refresh-slot

slot index

Recompute one slot

refresh-layout

layout id

Recompute one layout

next-page

layout id

Go to next page

previous-page

layout id

Go to previous page

first-page

layout id

Jump to first page

set-variable

name expression

Set menu variable

23 April 2026