Skip to content

Requirements

Star Butterfly edited this page Aug 19, 2018 · 16 revisions

Syntax

This is the syntax for the requirement(s).
Replace [yourRequirement] with a own name and [requirement] with one of the requirements listed below.
Also make sure to use the right requirement (view_requirement, left_click_requirement, 'right_click_requirement', or open_requirement) depending on where you want to use it.

view_requirement: # Can also be click or open_requirement
  requirements:
    [yourRequirement]:
      [requirement]

Has permission

Checks, if a user has a certain permission

type: has permission
permission: your.permission.here

Has money

Checks, if a player has enough money (Vault required)

type: has money
amount: 100

Has item

Checks, if a player has a certain item

type: has item
material: STONE
data: 1
amount: 32
name: 'Example name'
lore:
- 'Example lore 1'
- 'Example lore 2'

Javascript

Evaluates a javascript expression that must return true or false

type: javascript
expression: '%vault_eco_balance% >= 100'

String contains

Checks, if string input: contains string output:

type: string contains
input: '%player_name%'
output: 'A'

Comparators

Compares number values. Returns true or false. Checks if integer/placeholder input: is compared to integer/placeholder output:

type: (=, >, >=, <, <=, !=)
input: '17'
output: '100'

Clone this wiki locally