Minigames Perks | Conditions

Nov 29, 2019
Minigames Perks | Conditions
  • Usage:
    Put the conditions under the condition: part of the perk and follow the examples. Some conditions may require additional condition in order for it to work. Check the examples!
    Example for a condition:
    Code (YAML):
    conditions:
          has-armor-chestplate
    : victim
          has-armor-chestplate-items
    :
          - LEATHER_CHESTPLATE
          - CHAINMAIL_CHESTPLATE
          - IRON_CHESTPLATE
          - GOLD_CHESTPLATE
          - DIAMOND_CHESTPLATE
    NOTE: When you have possible values of player or victim - the victim is used only in events that has damage taking or death
    Example events about player or victim:
    hit-arrow-player
    (player is the player who shot the arrow, victim is the player who got hit)
    damage-take (player is the player who deals damage, victim is the player who takes the damage)
    consume (player is the player who consumes the potion/food, there is no victim, so typing victim will use the player)



    is-under-hp(top)

    Description: Checks if the player is under specific health.
    Possible values: player or victim
    Needed conditions: is-under-hp-value
    Examples:
    Checks if the player who executes the event or is dealing damage is under 10 hp (5 hearts):
    Code (YAML):
    conditions:
           is-under-hp
    : player
           is-under-hp-value
    : 10
    Checks if the player who is being damaged is under 4 hp (2 hearts):
    Code (YAML):
    conditions:
           is-under-hp
    : victim
           is-under-hp-value
    : 4

    is-under-hp-value(top)

    Description: Checks if the player is under specific health.
    Possible values: Number that's bigger than 0
    Needed conditions: is-under-hp​

    is-above-hp(top)

    Description: Checks if the player is above specific health.
    Possible values: player or victim
    Needed conditions: is-above-hp-value
    Examples:
    Checks if the player who executes the event or is dealing damage is above 10 hp (5 hearts):
    Code (YAML):
    conditions:
           is-above-hp
    : player
           is-above-hp-value
    : 10
    Checks if the player who is being damaged is above 4 hp (2 hearts):
    Code (YAML):
    conditions:
           is-above-hp
    : victim
           is-above-hp-value
    : 4

    is-above-hp-value(top)

    Description: Checks if the player is above specific health.
    Possible values: Number that's bigger than 0
    Needed conditions: is-above-hp​

    has-armor-helmet(top)

    Description: Checks if the player's helmet slot is specific value.
    Possible values: player or victim
    Needed conditions: has-armor-helmet-items
    Examples:
    Checks if the player who executes the event or is dealing damage has anything in his helmet armor slot:
    Code (YAML):
    conditions:
           has-armor-helmet
    : player
           has-armor-helmet-items
    : non-empty
    Checks if the player who executes the event or is dealing damage has empty helmet armor slot (no item).
    Code (YAML):
    conditions:
           has-armor-helmet
    : player
           has-armor-helmet-items
    : AIR
    Checks if the player who was hit has diamond or iron helmet:
    Code (YAML):
    conditions:
           has-armor-helmet
    : victim
           has-armor-helmet-items
    :
             - IRON_HELMET
             - DIAMOND_HELMET

    has-armor-helmet-items(top)

    Description: Check if the player's helmet is specific item.
    Possible values: non-empty or any minecraft item
    Needed conditions: has-armor-helmet​

    has-armor-chestplate(top)

    Description: Checks if the player's chestplate slot is specific value.
    Possible values: player or victim
    Needed conditions: has-armor-chestplate-items
    Examples:
    Checks if the player who executes the event or is dealing damage has anything in his chestplate armor slot:
    Code (YAML):
    conditions:
           has-armor-chestplate
    : player
           has-armor-chestplate-items
    : non-empty
    Checks if the player who executes the event or is dealing damage has empty chestplate armor slot (no item).
    Code (YAML):
    conditions:
           has-armor-chestplate
    : player
           has-armor-chestplate-items
    : AIR
    Checks if the player who was hit has diamond or iron chestplate:
    Code (YAML):
    conditions:
           has-armor-chestplate
    : victim
           has-armor-chestplate-items
    :
             - IRON_CHESTPLATE
             - DIAMOND_CHESTPLATE

    has-armor-chestplate-items(top)

    Description: Check if the player's chestplate is specific item.
    Possible values: non-empty or any minecraft item
    Needed conditions: has-armor-chestplate​

    has-armor-leggings(top)

    Description: Checks if the player's leggings slot is specific value.
    Possible values: player or victim
    Needed conditions: has-armor-leggings-items
    Examples:
    Checks if the player who executes the event or is dealing damage has anything in his leggings armor slot:
    Code (YAML):
    conditions:
           has-armor-leggings
    : player
           has-armor-leggings-items
    : non-empty
    Checks if the player who executes the event or is dealing damage has empty leggings armor slot (no item).
    Code (YAML):
    conditions:
           has-armor-leggings
    : player
           has-armor-leggings-items
    : AIR
    Checks if the player who was hit has diamond or iron leggings:
    Code (YAML):
    conditions:
           has-armor-leggings
    : victim
           has-armor-leggings-items
    :
             - IRON_LEGGINGS
             - DIAMOND_LEGGINGS

    has-armor-leggings-items(top)

    Description: Check if the player's leggings is specific item.
    Possible values: non-empty or any minecraft item
    Needed conditions: has-armor-leggings​

    has-armor-boots(top)

    Description: Checks if the player's boots slot is specific value.
    Possible values: player or victim
    Needed conditions: has-armor-boots-items
    Examples:
    Checks if the player who executes the event or is dealing damage has anything in his boots armor slot:
    Code (YAML):
    conditions:
           has-armor-boots
    : player
           has-armor-boots-items
    : non-empty
    Checks if the player who executes the event or is dealing damage has empty boots armor slot (no item).
    Code (YAML):
    conditions:
           has-armor-boots
    : player
           has-armor-boots-items
    : AIR
    Checks if the player who was hit has diamond or iron boots:
    Code (YAML):
    conditions:
           has-armor-boots
    : victim
           has-armor-boots-items
    :
             - IRON_BOOTS
             - DIAMOND_BOOTS

    has-armor-boots-items(top)

    Description: Check if the player's boots is specific item.
    Possible values: non-empty or any minecraft item
    Needed conditions: has-armor-boots​

    holds-item-main(top)

    Description: Checks if the player holds specific item or items in his hand.
    Possible values: non-empty or any minecraft item
    Examples:
    Checks if the player who executes the event or is dealing damage has any axe in his main hand:
    Code (YAML):
    conditions:
          holds-item-main
    :
          - WOOD_AXE
          - STONE_AXE
          - GOLD_AXE
          - IRON_AXE
          - DIAMOND_AXE
    Checks if the player who executes the event or is dealing damage has nothing in his hand:
    Code (YAML):
    conditions:
          holds-item-main
    : AIR
    Checks if the player who executes the event or is dealing damage has anything but air in his hand:
    Code (YAML):
    conditions:
          holds-item-main
    : non-empty

    holds-item-offhand(top)

    Description: Checks if the player holds specific item or items in his second hand.
    Possible values: non-empty or any minecraft item
    Examples:
    Checks if the player who executes the event or is dealing damage has any axe in his offhand:
    Code (YAML):
    conditions:
          holds-item-offhand
    :
          - WOOD_AXE
          - STONE_AXE
          - GOLD_AXE
          - IRON_AXE
          - DIAMOND_AXE
    Checks if the player who executes the event or is dealing damage has nothing in his hand:
    Code (YAML):
    conditions:
          holds-item-offhand
    : AIR
    Checks if the player who executes the event or is dealing damage has anything but air in his hand:
    Code (YAML):
    conditions:
          holds-item-offhand
    : non-empty

    is-damage-cause(top)

    Description: Checks what the damage cause is.
    Possible values: any damage cause
    Can be used with: damage-take event
    Examples:
    Checks if the player who takes damage has taken it from a fall and reduces it fully (100%)
    Code (YAML):
        event: damage-take
        conditions
    :
          is-damage-cause
    : FALL
        prizes
    :
          reduce-damage
    : 100.0
    Checks if the player who takes damage has taken it from the attack of another entity/player and reduces the damage by 50%:
    Code (YAML):
        event: damage-take
        conditions
    :
          is-damage-cause
    :
            - ENTITY_ATTACK
            - ENTITY_SWEEP_ATTACK
        prizes
    :
          reduce-damage
    : 50.0

    is-last-damage-cause(top)

    Description: Checks what is the last damage cause a player or the victim
    Possible values: player or victim
    Needed conditions: is-last-damage-cause-list
    Examples:
    Heals with 1 heart the player if his last damage is done by fire or lava.
    Code (YAML):
        event: consume
        prizes
    :
          heal
    : 2
        conditions
    :
           is-last-damage-cause
    : player
           is-last-damage-cause-list
    :
            - FIRE
            - FIRE_TICK
            - LAVA
           
    Increase the damage of the arrow hit if the victim player's last damage is from any projectile:
    Code (YAML):
        event: hit-arrow-player
        prizes
    :
          increase-damage
    : 2
        conditions
    :
           is-last-damage-cause
    : victim
           is-last-damage-cause-list
    : PROJECTILE
           

    is-last-damage-cause-list(top)

    Description: List of the damage causes for is-last-damage-cause
    Possible values: any damage cause
    Needed conditions: is-last-damage-cause​

    is-food(top)

    Description: Checks if the item that the player consumed is food
    Possible values: any or minecraft item (better be food)
    Must be used with: consume event
    Examples:
    Checks if the consumed item is any food:
    Code (YAML):
        event: consume
        conditions
    :
          is-food
    :
           - any
    Checks if the consumed item is a cookie or an apple:
    Code (YAML):
        event: consume
        conditions
    :
          is-food
    :
           - COOKIE
            - APPLE

    is-potion(top)

    Description: Checks if the item that the player consumed is food
    Possible values: any or minecraft potion
    Must be used with: consume event
    Examples:
    Checks if the consumed potion is of any type.
    Code (YAML):
        event: consume
        conditions
    :
          is-potion
    :
           - any
    Checks if the consumed potion is instant heal or regen.
    Code (YAML):
        event: consume
        conditions
    :
          is-potion
    :
           - INSTANT_HEAL
            - REGEN

    is-building-material(top)

    Description: Checks if the placed/broken block is any building material. Building materials are all materials from the building tab.
    Possible values: true or false
    Must be used with: place or break events
    Examples:
    Checks if the placed block is any building material
    Code (YAML):
        event: place
        conditions
    :
          is-building-material
    : true

    is-in-world(top)

    Description: Checks if the player is in specific world.
    Possible values: string
    Examples:
    Activates the perk only if the player is in the minigames perks.
    Code (YAML):
       conditions:
          is-in-world
    : minigames

    <- Back to the main page
  • Loading...
  • Loading...