Skip to content

Requirements

GabyTM edited this page Nov 14, 2018 · 16 revisions

Syntax

This is the syntax for the requirement(s).
Replace [requirement-type] 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:
    requirement_name: # Can be anything but it must be unique if you use more than 1 requirement
      [requirement-type]

For right/left_click_requirement you can add deny_commands: so when the requirements aren't true it will run the commands under deny_commands:. deny commands can be any of this.

left_click_requirement: # or right_click_requirement:
  requirements:
    requirement_name: # Can be anything but it must be unique if you use more than 1 requirement
      [requirement-type]
  deny_commands:
  - '[message] &cyou don''t have access for this item.'

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 equals

Checks, if string input: equals to string output:

type: string equals
input: '%player_name%'
output: 'aBooDyy'

String equals ignorecase

Checks, if string input: equals to string output: but it ignores case

type: string equals ignore case
input: '%player_name%'
output: 'aboodyy'

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