Astral Realms Documentation Help

Menu Requirements

Requirements are conditional guards that control item visibility (view-requirements) and click permission (clicks-requirements). All requirements in a list must pass for the action to proceed.

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.

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] %var.count% >= 5" - "[compare] %player.health% < 10" - "[compare] %param.tab% == shop"

contains

Tests whether one string contains another. Both sides support placeholders.

- "[contains] %player.name% Steve"

Passes if %player.name% contains the substring Steve.

regex

Tests whether a value matches a Java regular expression.

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

length

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

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

- "[length] %param.username% >= 3" - "[length] %param.username% <= 16"

has-item

Checks whether the player has at least one item matching the given material (or custom item ID) in their inventory. Supports the same item provider namespaces as material in item stacks.

- "[has-item] DIAMOND" - "[has-item] itemsadder-ia_key"

Requirement Summary Table

ID

Value format

Description

permission

[!]node

Check (negated) permission

compare

<left> <op> <right>

Numeric or string comparison

contains

<haystack> <needle>

Substring check

regex

<value> <pattern>

Regex match

length

<value> <op> <int>

String length comparison

has-item

item ID

Inventory item presence

23 April 2026