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"

has-item

Checks whether the executing player carries a given item. The value is resolved to an ItemStack, then matched against the player's inventory: stacks are compared by similarity (material, item meta, enchantment storage, damage/max-damage and persistent data — the stack size is ignored), and the amounts of all matching stacks are summed until the resolved item's own amount is covered. The whole inventory contents are scanned, armor and offhand included.

Parameter

Description

value

An ItemStack placeholder — a placeholder resolving to an ItemStack (e.g. %parameters_ticket%, or a menu's wrapped item form). A plain material name is not accepted.

- "[has-item] %parameters_ticket%"

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

has-item

item

Player inventory contains a similar item

Last modified: 03 September 2026