settings:
requirements:
list:
minimumRequirements: Integer # the minimum amount of requirements a player must pass (default: -1, all) (OPTIONAL)
'unique requirement name':
# use !<type> to negate a requirement, for example '!string equals'
type: String # the name of a valid requirement (see 'Types' below) (REQUIRED)
optiona: Boolean # whether a requirement is optional (default: false) (OPTIONAL)
failActions: List<Action> # actions executed if the requirement fails (OPTIONAL)
Types
Location
Requirements for player's current location
Variables:
Distance
Check if the distance between player's location and a specific location is ≤ than n
Format
type: 'distance'
location: Location # or placeholder that returns one (see 'Variable Types')
distance: Number # or placeholder that returns a number
# The player must be close to world 25/100/200 (X/Y/Z)
type: 'distance'
location: world;25;100;200
distance: 10
Numbers
Format
type: operation # See below
left: number # or placeholder that returns a number
right: number # or placeholder that returns a number
Equal (==)
Check if the numbers are equal
type: '=='
left: 10
right: 15
# Result: false, 10 and 15 are not equal
Greater (>)
Check if left is greater than right
type: '>'
left: 10
right: 15
# Result: false, 10 is not greater than 15
Greater or equal (>=)
Check if left is greater or equal to right
type: '>='
left: 20
right: 15
# Result: true, 20 is greater or equal to 15
Smaller (<)
Check if left is smaller than right
type: '<'
left: 10
right: 15
# Result: true, 10 is smaller than 15
Smaller or equal (<=)
Check if left is smaller or equal to right
type: '<='
left: 20
right: 15
# Result: false, 20 is not greater or equal to 15
Strings
Compare two strings
Format
type: operation # See below
left: string # or placeholder that returns a string
right: string # or placeholder that returns a string
Equals (string equals)
Check if left is equal to right - case sensitive
type: string equals
left: Steve
right: steve
# Result: false, 'Steve' is not the same as 'steve'
Equals ignore case (string equals ignore case)
Check if left is equal to right - case insensitive
type: string equals ignore case
left: Steve
right: steve
# Result: true, 'Steve' is equal to 'steve'
Contains (string contains)
Check if left contains right - case sensitive
type: string contains
left: ArcaneVouchers
right: vouchers
# Result: false, 'ArcaneVouchers' does not contain 'vouchers'
Contains ignore case (string contains ignore case)
Format: world;x;y;zExample: world_the_end;25;100;30 - The End at 25/100/30
Examples
Check if the player has ≤ 10 HP
# %player_health% ≤ 10
left: '%player_health%'
type: '<='
right: 10
failActions:
- '[message] <red>You can not use this item at full HP'
Check if the player is the owner of the WorldGuard region he's standing in
left: '%worldguard_region_owner%'
type: string equals
right: '%player_name%'
failActions:
- '[message] <red>You can use this item only in your own protection'
Compare two numbers using math operations. The requirement uses , meaning decimals are supported.