Astral Realms Documentation Help

Requirements

Requirements are conditional guards used wherever the AstralCore configuration layer needs to gate something on player state — most commonly item visibility (view-requirements) and click permission (clicks-requirements) in menus, button gating in dialogs, and the open/use checks in collections. By default all requirements in a list must pass for the action to proceed; the min-requirements field can relax this to "N of M must pass".

A requirement can be written in two forms.

Inline (shorthand)

view-requirements: - "[permission] myplugin.vip"

Object form (with deny-actions)

clicks-requirements: LEFT: - type: permission value: "myplugin.shop" deny-actions: - "[message] <red>You need myplugin.shop to use this."

deny-actions is a list of Actions executed on the player when this requirement fails.

min-requirements (object form)

When you want "any N of these must pass" instead of "all", wrap the list in an object:

view-requirements: min-requirements: 2 requirements: - "[permission] myplugin.vip" - "[permission] myplugin.member" - "[compare] %variables_score% >= 100"

Built-in Requirements

permission

Checks whether the player has a given permission node. Prefix with ! to negate.

Parameter

Description

value

Permission node string. Prefix ! for negation.

- "[permission] myplugin.admin" # must have - "[permission] !myplugin.banned" # must NOT have

compare

Compares two values using a relational operator. Both operands support placeholder substitution and are coerced to numbers when possible; otherwise a lexicographic string comparison is used.

Supported operators: ==, !=, >, <, >=, <=

- "[compare] %variables_count% >= 5" - "[compare] %player_health% < 10" - "[compare] %parameters_tab% == shop" - "[compare] %layouts_items_hasNextPage% == true"

regex

Tests whether a value matches a Java regular expression. Format: <value> <pattern>.

- "[regex] %player_name% ^[A-Za-z0-9_]{3,16}$"

string-length

Checks the character length of a string. Format: <string> <operator> <int>.

Supported operators: ==, !=, >, <, >=, <=

- "[string-length] %parameters_username% >= 3" - "[string-length] %parameters_username% <= 16"

world

Checks the world the player is currently in. Format: <operator> <world-name>.

Supported operators: ==, !=

- "[world] == world_nether" - "[world] != lobby"

Requirement Summary Table

ID

Value format

Description

permission

[!]node

Check (negated) permission

compare

<left> <op> <right>

Numeric or string comparison

regex

<value> <pattern>

Regex match

string-length

<value> <op> <int>

String length comparison

world

<op> <world-name>

Player current world check

Last modified: 25 July 2026