Skip to main content

Conditions

Conditions are used to set requirements to be met in order to complete an achievement.
Below is a list of the built-in conditions:

info

By default, all lists of entities, items, etc. are treated as whitelists.
To make them blacklists, add blacklist: true.

Blacklist example:

conditions:
- type: items
items:
- "NETHERITE_INGOT"
blacklist: true
tip

Wildcards are supported in most condition types:

conditions:
- type: items
items:
- "*_PICKAXE" # Matches all types of pickaxes
Version 1.0

Global Conditions

Supported by all types of achievements.

ConditionDescriptionExamples
game-modesAllowed game modes- SURVIVAL
worldsAllowed worlds- "world"
item-in-handRequires the player to have an item in hand- <material>
item-equippedRequires the player to have an item equipped- <material>
riding-entityRequires the player to ride an entity- ALL
- <entity>
regionsA list of WorldGuard regions- <region-id>
is-sneakingRequires the player to be sneakingtrue false
is-sprintingRequires the player to be sprintingtrue false
is-flyingRequires the player to be flyingtrue false
has-open-inventoryChecks if the player has an inventory open.
It isn't possible to check if the player's own inventory is open.
true false

Task-specific Conditions

Supported only by some types of achievements.

ConditionDescriptionExamples
entitiesA list of entities- CHICKEN
- mythicmobs:<mob-id>
- mm:<mob-id>
itemsA list of items- <material>
blocksA list of blocks- <material>
potion-effectsA list of potion types- SWIFTNESS
crop-ageSpecify crop growth stagesMAX <age>

Global conditions

Supported by all types of achievements.

ConditionDescriptionExamples
game_modesAllowed game modesgame-modes
worldsAllowed worldsworlds
has_itemRequires the player to have an item in their inventoryitems
has_heldRequires the player to have an item in handitems
has_equippedRequires the player to have an item equippeditems
riding_entityRequires the player to ride an entityentities
is_sneakingRequires the player to be sneakingvalue (true/false)
is_sprintingRequires the player to be sprintingvalue (true/false)
is_flyingRequires the player to be flyingvalue (true/false)
has_inventory_openChecks if the player has an inventory open.
It isn't possible to check if the player's own inventory is open.
value (true/false)

Plugin Hooks

PluginConditionDescriptionRequired arguments
WorldGuardregionsCheck if a player is within a regionregions
VaultvaultCheck if a player has a certain amount of moneybalance
PlaceholderAPIplaceholderEvaluate a PAPI placeholderplaceholder value operator
CustomFishingcustom_fishing_lootA list of loot IDsloot

Other conditions

Supported only by some types of achievements: refer to the tasks documentation.

ConditionDescriptionRequired arguments
entitiesA list of entitiesentities
is_hostileCheck if an entity is hostilevalue (true/false)
itemsA list of itemsitems
blocksA list of blocksblocks
potion_typesA list of potion typestypes
crop_ageSpecify crop growth stagesage (growth stage/MAX)
damage_causesA list of damage causescauses