seal-exclamationMenu Conditions

Conditions allow you to control item visibility and clickability based on requirements.

Condition Types

Condition Type
Purpose

view-requirement

Controls whether the item is visible in the menu

click-requirement

Controls whether the item is clickable when visible

View Requirements

Determines if an item should be displayed at all.

menu-items:
  'tier-5-sword':
    slot: '14'
    material: 'NETHERITE_SWORD'
    name: '&5&lTier 5 Sword'
    
    # Only visible if player has tier 4 or higher
    view-requirement: '%phantomdungeons_sword_tier% >= 4'
circle-info

If view-requirement evaluates to false, the item slot will be empty in the menu.

Click Requirements

Determines if a visible item can be clicked.

circle-exclamation

Operators

Use these operators in your conditions:

Operator
Description
Example

>=

Greater than or equal

%balance% >= 1000

<=

Less than or equal

%level% <= 10

>

Greater than

%tier% > 3

<

Less than

%page% < 5

=

Equal to

%status% = active

!=

Not equal to

%type% != beginner

Logical Operators

Combine multiple conditions using logical operators:

AND Conditions

Both conditions must be true.

OR Conditions

At least one condition must be true.

Complex Conditions

You can combine AND/OR for complex logic:

Conditional Lore

Display different lore lines based on conditions using if(condition) then text syntax:

circle-check

Number Formatting

The condition system supports abbreviated numbers for readability:

Suffix
Name
Value

k

Thousand

1,000

M

Million

1,000,000

B

Billion

1,000,000,000

T

Trillion

1,000,000,000,000

Qa

Quadrillion

1e15

Qi

Quintillion

1e18

Sx

Sextillion

1e21

Sp

Septillion

1e24

Dc

Decillion

1e33

Examples:

Common Patterns

Progressive Unlocks

Currency Gates

Permission Tiers

Time-Based

Troubleshooting

chevron-rightCondition Always False - Problem: Item never appearshashtag

Solutions:

  • Check placeholder is returning expected value

  • Verify operator is correct (>= vs >)

  • Test placeholder with /papi parse me %placeholder%

chevron-rightCondition Always True - Problem: Item always clickable when shouldn't behashtag

Solutions:

  • Check for typos in condition string

  • Ensure proper use of AND/OR

  • Verify placeholder exists and isn't null

chevron-rightConditional Lore Not Showing — Problem: `if()` statement appears as literal texthashtag

Solutions:

  • Check syntax: if(condition) then text

  • Ensure no extra spaces

  • Verify condition is valid

Quick Reference

Usage
Example

View requirement

view-requirement: '%tier% >= 3'

Click requirement

click-requirement: '%balance% >= 1000'

AND condition

'%a% = 1 AND %b% = 2'

OR condition

'%a% = 1 OR %b% = 2'

Complex condition

'(%a% = 1 OR %b% = 2) AND %c% > 0'

Conditional lore

if(%tier% >= 5) then &aMax tier!

Abbreviated number

%balance% >= 1.5M

Last updated