Conditions
Guide to view and click conditions
Conditions are used to add requirements for a player to view or click an item. There are two ways a condition can be used:
For both ways, there are the following types of conditions available:
Scopes
View conditions
View conditions will hide the item if not all conditions are met. Add the view_conditions
key to an item to add view conditions. The syntax of this option is a map list of condtion types, see below.
Click conditions
Click conditions will prevent click actions or built-in click behavior from running if not all conditions are met. Click conditions are added using the on_click_conditions
key, or for a specific button trigger like on_right_click_conditions
. The syntax of these options is a map list of condition types, see below.
Types
Permission
Permission conditions check if the player has a permission. Uses type: permission
, though this is optional due to auto type detection. Keys:
permission
- The permission node to check (required).value
- An optional boolean key to check the permission value against (defaults to true).
An example permission condition required to click an item:
Placeholder
Placeholder conditions compare two values that can contain PlaceholderAPI placeholders. Uses type: placeholder
, though this is optional due to auto type detection. Keys:
placeholder
- A string used as the left side value to be compared (required).value
- A string used as the right side value to be compared (required).compare
- An optional string that specifies the type of comparison to perform (defaults to equals). The following values are valid:equals
- checks for numerical or string equalitygreater_than
- checks ifplaceholder
is strictly greater thanvalue
greater_than_or_equals
- checks ifplaceholder
is greater than or equal tovalue
less_than
- checks ifplaceholder
is strictly less thanvalue
less_than_or_equals
- checks ifplaceholder
is less than or equal tovalue
Any compare
other than equals
requires both placeholder
and value
to be evaluated to doubles.
An example placeholder condition that requires Fighting 100 to view an item:
An example placeholder condition that requires at least skill average 20 to click an item:
Last updated