Requirements
Everything about DeluxeMenus requirements!
IMPORTANT!
left/right/shift_left/shift_right/middle
click requirements won't work unless you also have their respective click commands. This is true even if you have set the success_commands
option
Syntax
Requirements allow you to restrict certain actions or even an entire menu and only allow certain players to see and/or use the menu.
Requirements
Type | Description |
Defines the requirements to open the menu. | |
Defines the requirements to see an item in the menu. | |
Defines the requirements to (shift) left/right click an item. |
Placeholders and arguments can be used in the requirements.
If you set multiple requirements, all of them should be met (Use JavaScript type or minimum_requirements to add optional requirements).
Requirement types
When inverting requirements, make sure you put the type in quotation marks. This is because "!" is a special symbol in YAML so it will break the syntax.
ex: type: "!has permission"
Has permission
Checks if the player has the specified permission.
To invert the requirement (Check if the player doesn't have the permission) you can simply add the exclamation mark before the type name (like this type: "!has permission"
).
Has money
Checks if the player has the specified amount of money (Vault is required).
To invert the requirement (Check if the player doesn't have the amount of money) you can simply add the exclamation mark before the type name (like this type: "!has money"
).
To use a placeholder as a value for the amount, replace the amount:
field with placeholder:
.
Has Item
Required fields:
Material
Checks if the player has the specified item in the inventory.
To invert the requirement (Check if the player doesn't have the item) you can simply add the exclamation mark before the type name (like this type: "!has item"
).
Has Meta
Meta uses Persistent Data Containers which means this feature will only work on servers that are 1.14 or newer!
Required fields:
key
meta_type
value
Checks if the player has the specified meta.
If the meta_type
is a number format (DOUBLE, LONG, INTEGER) it will check if the player's meta value is greater than or equal to the value
To invert the requirement (Check if the input doesn't match the output) you can simply add the exclamation mark before the type name (like this type: "!has meta"
).
Has Exp
Required fields:
amount
Checks if the player has the exp level or points.
If the level
option does not exist, it will check for exp points by default
To invert the requirement (Check if the input doesn't match the output) you can simply add the exclamation mark before the type name (like this type: "!has exp"
).
Is Near
Required fields:
location
distance
Checks if the player is within distance
of location
.
To invert the requirement (Check if the input doesn't match the output) you can simply add the exclamation mark before the type name (like this type: "!is near"
).
JavaScript
Example:
Evaluates a JavaScript expression that must return true or false.
String Equals
Example:
Checks if input:
matches output:
(Case sensitive).
To invert the requirement (Check if the input doesn't match the output) you can simply add the exclamation mark before the type name (like this type: "!string equals"
).
String Equals Ignore Case
Example:
Checks if input:
matches output:
(Case insensitive).
To invert the requirement (Check if the input doesn't match the output) you can simply add the exclamation mark before the type name (like this type: "!string equals ignorecase"
).
String Contains
Example:
Checks if input:
contains output:
(Case sensitive).
To invert the requirement (Check if the input doesn't contain the output) you can simply add the exclamation mark before the type name (like this type: "!string contains"
).
Regex matches
Checks if input:
contains the regular expression in regex:
.
Visit this site to create regular expressions easily.
To invert the requirement (Check if the input doesn't contain the regular expression) you can simply add the exclamation mark before the type name (like this type: "!regex matches"
).
Comparators
Compares input:
with output:
.
Now both the input and the output support floating point values.
Available options
Comparator | Description |
|
|
|
|
|
|
|
|
|
|
|
|
Examples
Open Requirement
View Requirement
Left/Right Click Requirement
Minimum Requirements
Last updated