# This option can also be:# open_requirement:# click_requirement:# left_click_requirement:# right_click_requirement:# shift_left_click_requirement:# shift_right_click_requirement:view_requirement:# This option is not needed.# If you use this, only one of the# requirements needs to be meet.minimum_requirements: 1requirements:# You can define multiple requirements.# Each requiremnt should have a unique name.requirement_name:type: TYPE# This can only be defined for open and# left/right click requirementdeny_commands:- "[ACTIONTYPE] ACTION"- "[ACTIONTYPE] ACTION"
Requirements allow you to restrict certain actions or even an entire menu and only allow certain players to see and/or use the menu.
Type | Description |
โOpen Requirementโ | Defines the requirements to open the menu. |
โView Requirementโ | Defines the requirements to see an item in the menu. |
Defines the requirements to (shift) left/right click an item. |
Placeholders 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).
type: has permissionpermission: TEXT
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"
).
type: has moneyamount: #
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:
.
type: has itemmaterial: "TEXT"data: #amount: #name: "TEXT"lore:- "TEXT"Required fields:
Material
Amount
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"
).
You can use color/format codes in name and lore fields, but using ยง
character instead of &
character.
type: has metakey: "TEXT"meta_type: <STRING, BOOLEAN, DOUBLE, LONG, INTEGER>value: EXPECTED VALUERequired 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"
).
type: is nearlocation: "WORLDNAME,X,Y,Z"distance: #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"
).
type: javascriptexpression: 'EXPRESSION'Example:
type: javascriptexpression: '%vault_eco_balance% >= 100'
Evaluates a JavaScript expression that must return true or false.
type: string equalsinput: "TEXT"output: "TEXT"Example:
type: string equalsinput: "%server_name%"output: "HelpChat"
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"
).
type: string equals ignorecaseinput: "TEXT"output: "TEXT"Example:
type: string equals ignorecaseinput: "%server_name%"output: "helpchat"
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"
).
type: string containsinput: "TEXT"output: "TEXT"Example:
type: string containsinput: "%server_name%"output: "chat"
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"
).
type: regex matchesinput: "TEXT"regex: "EXPRESSION"
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"
).
type: (==, >=, <=, !=, >, <)input: #output: #
Compares input:
with output:
.
Comparator | Description |
|
|
|
|
|
|
|
|
|
|
|
|
open_requirement:requirements:example_1:type: has permissionpermission: open.menu.onedeny_commands:- "[message] &cYou don't have the permission."
view_requirement:requirements:example_2:type: string equalsinput: "%player_is_op%"output: "yes"
# left_click_requirement: orright_click_requirement:requirements:example_3:type: has moneyamount: 100deny_commands:- "[message] &7You don't have enough money."