Conditions
Conditions:
Conditions enable implementing various checks to ensure a treasure is only executed when all specified conditions are met.
<treasure name>:
conditions:
<condition 01>:
type: <type>
<condition 02>:
type: <type>
<condition 03>:
type: <type>
WORLD:
Specifies the worlds where the treasure can or cannot be found.
type
: WORLDmethod
: BLACKLIST or WHITELISTvalues
: List of world names.
Example:
worlds:
type: WORLD
method: BLACKLIST
values:
- "world_nether"
BLOCK:
Specifies the blocks that are restricted or permitted for the treasure.
type
: BLOCKmethod
: BLACKLIST or WHITELISTvalues
: List of blocks.
Example:
blocks:
type: BLOCK
method: BLACKLIST
values:
- "BEDROCK"
- "DIRT:0"
- "DIRT:4"
BIOME:
Specifies the biomes where the treasure can or cannot appear.
type
: BIOMEmethod
: BLACKLIST or WHITELISTvalues
: List of biomes.
Example:
biomes:
type: BIOME
method: BLACKLIST
values:
- "JUNGLE"
ITEM:
Specifies the items associated with the treasure. This can include:
type
: ITEMmaterial
: Material of the item (e.g.,'DIRT:1'
).amount
: Quantity of the item.name
: Name of the item.lores
: List of lore texts associated with the item.options
: Additional options to refine the condition, such as:name_ignorecase
: Ignore case for the name.lores_ignorecase
: Ignore case for the lores.name_contains
: Check if the name contains specific text.lores_contains
: Check if any lore contains specific text.in_armor
: Check if the item is in armor slots.in_inventory
: Check if the item is in inventory.in_hotbar
: Check if the item is in the hotbar.in_hand
: Check if the item is in the main hand.in_offhand
: Check if the item is in the offhand.
metadatas
: Additional item data, such as:type
: Comparison type (>
,<
,==
, ...).key
: Metadata key (e.g., custom tag).value
: Value for comparison.
Example:
items:
type: ITEM
material: 'DIRT:1'
amount: 1
name: "&cLucky Dirt"
lores:
- "&4Cool lore"
- "&4Cool other line"
options:
name_ignorecase: true
lores_ignorecase: true
name_contains: true
lores_contains: true
in_armor: false
in_inventory: false
in_hotbar: false
in_hand: true
in_offhand: true
metadatas:
'1':
type: '>='
key: "test"
value: 3
'2':
type: 'EQUALS'
key: "test2"
value: "txt"
STRING CONDITION:
Defines a string condition that compares a value within the game. This includes:
type
:CONTAINS
EQUALS
EQUALS_IGNORE_CASE
NOT_CONTAINS
NOT_EQUALS
NOT_EQUALS_IGNORE_CASE
input
: Value to be compared, such as a placeholder (e.g.,%player_world%
).output
: Expected value for comparison.
Example:
my-world-placeholder-check:
type: 'NOT_CONTAINS'
input: "%player_world%"
output: "end"
NUMBER CONDITION:
Defines a numeric condition based on a comparison operator. This includes:
type
:>
>=
==
!=
<
<=
input
: Numeric value to be compared, such as a placeholder (e.g.,%vault_eco_balance_fixed%
).output
: Value to compare theinput
against.
Example:
my-balance-placeholder-check:
type: '>='
input: "%vault_eco_balance_fixed%"
output: 0.0
PLACED:
Ignores blocks placed by the player.
type
:PLACED
ignore
: Specifies whether player-placed blocks should be ignored (true
orfalse
).
Example:
ignore-player-placed-blocks:
type: PLACED
ignore: true
Last updated