View Requirements
View Requirements & Priority System
Overview
The View Requirements and Priority system allows you to create dynamic, personalized shop menus that adapt to each player's permissions, rank, level, balance, and more. This powerful feature lets you show different items to different players in the same slot, creating a truly customized shopping experience.
Table of Contents
Priority System
View Requirements
Permission Requirements
Placeholder Requirements
Numeric Comparisons
JavaScript Expressions
Complete Examples
Best Practices
Priority System
What is Priority?
Priority determines which item displays when multiple items target the same inventory slot. The item with the highest priority value that meets its view requirements will be shown.
How It Works
Default Priority: If not specified, items have a priority of
0Higher Wins: Items with higher priority values override lower ones
Requirements First: Only items that meet their view requirements compete
Dynamic Display: Different players see different items based on their status
Basic Priority Example
Result:
Default players see:
basic_sword(priority 1)VIP players see:
vip_sword(priority 5 beats 1)MVP players see:
mvp_sword(priority 10 beats 5)
View Requirements
View requirements determine who can see an item. If a player doesn't meet the requirements, the item is completely hidden from their menu.
Basic Structure
Note: All requirements within a single view-requirement section must be met (AND logic). If any requirement fails, the item is hidden.
Permission Requirements
Single Permission
Show an item only to players with a specific permission.
Multiple Permissions (OR Logic)
Show an item if the player has at least one of the listed permissions.
Result: Players with VIP, MVP, or Ultimate rank can see this item.
Placeholder Requirements
String Comparison (Equals)
Check if a placeholder equals a specific value.
String Comparison (Not Equals)
Check if a placeholder does not equal a specific value.
Result: Only players who are not in the "default" group can see this item.
Common Placeholders
%player_name%
Player's username
None
%player_level%
Player's level
None
%player_world%
Current world
None
%vault_eco_balance%
Player's balance
Vault
%luckperms_primary_group%
Player's rank
LuckPerms
%statistic_deaths%
Death count
None
%statistic_play_one_minute%
Playtime (minutes)
None
Numeric Comparisons
Compare numeric placeholder values using mathematical operators.
Comparison Operators
==
equals
Equal to
!=
not-equals
Not equal to
>
greater-than
Greater than
>=
greater-than-or-equals
Greater than or equal
<
less-than
Less than
<=
less-than-or-equals
Less than or equal
Level Requirement Example
Result: Only players level 50 or higher can see this item.
Balance Requirement Example
Result: Only players with $100,000+ can see this item.
Multiple Numeric Items (Priority + Level)
Result:
Level 1-24: See
beginner_packageLevel 25-49: See
intermediate_packageLevel 50+: See
advanced_package
JavaScript Expressions
For complex conditions that require multiple checks or custom logic, use JavaScript expressions.
Basic Syntax
Supported Operations
Math:
+,-,*,/,%Comparison:
>,<,>=,<=,==,!=Logical:
&&(AND),||(OR),!(NOT)Grouping:
( )
Example: Level AND Balance
Result: Player must be level 30+ AND have $50,000+
Example: Multiple Conditions with OR
Result: Player must either be level 100+ OR have $1,000,000+
Example: Complex Logic
Result: Show if (level 50+ AND $100k+) OR player is named "Admin"
{% hint style="danger" %} Warning: JavaScript expressions are evaluated on every menu open. Complex expressions may impact performance on large servers. {% endhint %}
Complete Examples
Example 1: Rank-Based Shop
Create a shop where items change based on player rank in the same slots.
Example 2: Progressive Level Shop
Items unlock as players level up.
Example 3: VIP Exclusive Section
Create items that only VIP+ members can see.
Example 4: Multi-Condition Items
Combine multiple requirements for complex conditions.
Example 5: Event-Based Items
Show items based on specific conditions (requires additional placeholders).
Best Practices
1. Use Priority Strategically
Tip: Use increments of 5 or 10 to leave room for future items.
2. Always Set Fallback Items
3. Test Requirements Thoroughly
Test with players of different ranks
Test with different level ranges
Test with varying balances
Use
/sudoor alt accounts for testing
4. Document Your Requirements
5. Optimize Performance
Tip: Use simple permission/placeholder checks when possible. Reserve JavaScript for truly complex conditions.
6. Avoid Requirement Conflicts
Troubleshooting
Item Not Showing
Check View Requirements: Use
/papi parse me %placeholder%to test placeholder valuesCheck Priority: Another item might have higher priority
Check Permission: Verify player has required permissions
Check Page: Ensure item is on correct page
Wrong Item Showing
Verify Priority Values: Higher priority item might be meeting requirements
Check Placeholder Values: Placeholders might not return expected values
Test JavaScript: JavaScript expression might have logic errors
Additional Resources
PlaceholderAPI Wiki: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki
JavaScript Tutorial: https://www.w3schools.com/js/
Common Placeholders:
/papi ecloud list all
Support
If you need help with view requirements or priority:
Check this documentation thoroughly
Test placeholder values with
/papi parse me %placeholder%Contact support with your configuration and error logs
Last updated