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: 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:
BIOME:
Specifies the biomes where the treasure can or cannot appear.
type: BIOMEmethod: BLACKLIST or WHITELISTvalues: List of biomes.
Example:
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:
STRING CONDITION:
Defines a string condition that compares a value within the game. This includes:
type:CONTAINSEQUALSEQUALS_IGNORE_CASENOT_CONTAINSNOT_EQUALSNOT_EQUALS_IGNORE_CASE
input: Value to be compared, such as a placeholder (e.g.,%player_world%).output: Expected value for comparison.
Example:
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 theinputagainst.
Example:
PLACED:
Ignores blocks placed by the player.
type:PLACEDignore: Specifies whether player-placed blocks should be ignored (trueorfalse).
Example:
Last updated