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)
Object form (with deny-actions)
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 |
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: ==, !=, >, <, >=, <=
contains
Tests whether one string contains another. Both sides support placeholders.
Passes if %player.name% contains the substring Steve.
regex
Tests whether a value matches a Java regular expression.
length
Checks the character length of a string. Format: <string> <operator> <int>.
Supported operators: ==, !=, >, <, >=, <=
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.
Requirement Summary Table
ID | Value format | Description |
|---|---|---|
|
| Check (negated) permission |
|
| Numeric or string comparison |
|
| Substring check |
|
| Regex match |
|
| String length comparison |
| item ID | Inventory item presence |