Skip to main content

Conditions

EasyMenu 7 features a unified condition syntax used identically across open-when, visible-when, enabled-when, and variant when clauses.


Condition Types​

Shorthand Forms​

Besides a section, a condition accepts these short forms:

FormMeaning
visible-when: "myserver.vip"A bare string is a permission check (permission). A blank string is an error.
visible-when: true / falseAlways passes / always fails. Handy for hiding an item temporarily.
Omitted (or an empty section)Always passes.

When one section lists several keys, all of them must hold (an implicit all).

visible-when:
permission: "myserver.vip" # shown only when both of these hold
world: "world"

An unknown key is an error (invalid-condition) and the reload is rejected.

1. Permissions​

Check if the player possesses a permission node:

visible-when:
permission: "myserver.vip"

2. World Restrictions​

Check the player's current world. World names are matched case-insensitively:

# Single world
visible-when:
world: "world_nether"

# List of allowed worlds
visible-when:
world:
- "world"
- "world_nether"

# in / not-in sections
visible-when:
world:
not-in:
- "world_the_end"

3. Gamemode Checks​

Check player gamemode (SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR). Matching is case-insensitive. Give a list to pass when any one of the modes matches:

visible-when:
gamemode: "SURVIVAL"

# Several modes (any of them)
enabled-when:
gamemode:
- SURVIVAL
- ADVENTURE

4. PlaceholderAPI Comparisons​

Compare values resolved via PlaceholderAPI against expectations. value, operator and compare are all required:

enabled-when:
placeholder:
value: "%vault_eco_balance%"
operator: ">="
compare: "1000"

Both value and compare are expanded when the menu is shown or clicked, so a placeholder may be written on either side.


Comparison Operators (operator)​

The following operators are supported in placeholder condition blocks:

OperatorTypeMeaningEvaluation Example
==Text (exact match)Equalsvalue: "%player_gamemode%", compare: "survival"
!=Text (exact match)Not equalsvalue: "%server_online%", compare: "0"
>NumberGreater thanvalue: "%vault_eco_balance%", compare: "500"
>=NumberGreater than or equalvalue: "%vault_eco_balance%", compare: "1000"
<NumberLess thanvalue: "%player_ping%", compare: "100"
<=NumberLess than or equalvalue: "%player_level%", compare: "50"
containsTextSubstring matchvalue: "%luckperms_primary_group_name%", compare: "vip"
not-containsTextSubstring exclusionvalue: "%luckperms_groups%", compare: "banned"
starts-withTextPrefix matchvalue: "%player_name%", compare: "admin_"
ends-withTextSuffix matchvalue: "%player_name%", compare: "_bot"

Operator Aliases​

These aliases are also accepted, case-insensitively:

OperatorAliases
===, eq, equals
!=<>, ne, not-equals
>gt
>=ge, gte
<lt
<=le, lte
Numeric Safety

Numeric operators (>, >=, <, <=) use arbitrary-precision numbers (BigDecimal). Thousands separators (1,000) are stripped before parsing. If either side fails to parse as a number, the condition safely evaluates to false without throwing an error. Text comparisons such as == and != are case-sensitive.


Logical Combinations (AND / OR / NOT)​

Combine multiple conditions:

All Must Hold (AND): all​

visible-when:
all:
- permission: "myserver.donor"
- placeholder:
value: "%vault_eco_balance%"
operator: ">="
compare: "5000"

Any May Hold (OR): any​

visible-when:
any:
- permission: "myserver.admin"
- permission: "myserver.moderator"

Inversion (NOT): not​

visible-when:
not:
world: "world_the_end"

all and any take a list of conditions. A non-list value is an error, and an empty list always passes.