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

1. Permissions

Check if the player possesses a permission node:

visible-when:
permission: "myserver.vip"

2. World Restrictions

Check the player's current world:

# 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):

visible-when:
gamemode: "SURVIVAL"

4. PlaceholderAPI Comparisons

Compare values resolved via PlaceholderAPI against expectations:

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

Comparison Operators (operator)

The following operators are supported in placeholder condition blocks:

OperatorTypeMeaningEvaluation Example
==Text / NumberEqualsvalue: "%player_gamemode%", compare: "survival"
!=Text / NumberNot 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"

:::note Numeric Safety Numeric operators (>, >=, <, <=) use arbitrary-precision numbers (BigDecimal). If either side fails to parse as a number, the condition safely evaluates to false without throwing an error. :::


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"