Requirements
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)
Check if the distance between player's location and a specific location is ≤ than
n
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
Compare two numbers using math operations. The requirement uses Doubles, meaning decimals are supported.
type: operation # See below
left: number # or placeholder that returns a number
right: number # or placeholder that returns a number
Check if the numbers are equal
type: '=='
left: 10
right: 15
# Result: false, 10 and 15 are not equal
Check if
left
is greater than right
type: '>'
left: 10
right: 15
# Result: false, 10 is not greater than 15
Check if
left
is greater or equal to right
type: '>='
left: 20
right: 15
# Result: true, 20 is greater or equal to 15
Check if
left
is smaller than right
type: '<'
left: 10
right: 15
# Result: true, 10 is smaller than 15
Check if
left
is smaller or equal to right
type: '<='
left: 20
right: 15
# Result: false, 20 is not greater or equal to 15
Compare two strings
type: operation # See below
left: string # or placeholder that returns a string
right: string # or placeholder that returns a string
Check if
left
is equal to right
- case sensitivetype: string equals
left: Steve
right: steve
# Result: false, 'Steve' is not the same as 'steve'
Check if
left
is equal to right
- case insensitivetype: string equals ignore case
left: Steve
right: steve
# Result: true, 'Steve' is equal to 'steve'
Check if
left
contains right
- case sensitivetype: string contains
left: ArcaneVouchers
right: vouchers
# Result: false, 'ArcaneVouchers' does not contain 'vouchers'
Check if
left
contains right
- case insensitivetype: string contains ignore case
left: ArcaneVouchers
right: vouchers
# Result: true, 'ArcaneVouchers' contains 'vouchers'
Format:
world;x;y;z
Example: world_the_end;25;100;30
- The End at 25/100/30Check 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'
Last modified 2mo ago