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>conditions-treasures:
  chance: 10.0
  conditions:
    worlds:
      type: WORLD
      method: BLACKLIST
      values:
      - "world_nether"
	  
    blocks:
      type: BLOCK
      method: BLACKLIST
      values:
      - "BEDROCK"
      - "DIRT:0"
      - "DIRT:4"
	  
    biomes:
      type: BIOME
      method: BLACKLIST
      values:
      - "JUNGLE"
	  
    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
		  
    'string conditions':
      type: 'NOT_CONTAINS'
      input: "%player_world%"
      output: "end"
    number-conditions:
      type: '>='
      input: "%vault_eco_balance_fixed%"
      output: 0.0
    ignore-player-placed-blocks:
      type: PLACED
      ignore: trueWORLD:
Specifies the worlds where the treasure can or cannot be found.
- type: WORLD
- method: BLACKLIST or WHITELIST
- values: 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: BLOCK
- method: BLACKLIST or WHITELIST
- values: 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: BIOME
- method: BLACKLIST or WHITELIST
- values: List of biomes.
Example:
  biomes:
    type: BIOME
    method: BLACKLIST
    values:
    - "JUNGLE"ITEM:
Specifies the items associated with the treasure. This can include:
- type: ITEM
- material: 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 the- inputagainst.
Example:
  my-balance-placeholder-check:
    type: '>='
    input: "%vault_eco_balance_fixed%"
    output: 0.0PLACED:
Ignores blocks placed by the player.
- type:- PLACED
- ignore: Specifies whether player-placed blocks should be ignored (- trueor- false).
Example:
  ignore-player-placed-blocks:
    type: PLACED
    ignore: trueLast updated
