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
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)
Contents
- is-under-hp
- is-under-hp-value
- is-above-hp
- is-above-hp-value
- has-armor-helmet
- has-armor-helmet-items
- has-armor-chestplate
- has-armor-chestplate-items
- has-armor-leggings
- has-armor-leggings-items
- has-armor-boots
- has-armor-boots-items
- holds-item-main
- holds-item-offhand
- is-damage-cause
- is-last-damage-cause
- is-last-damage-cause-list
- is-food
- is-potion
- is-building-material
- is-in-world
- javascript-condition
- bow-not-infinite
- is-material
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
Code (YAML):conditions:
is-under-hp: victim
is-under-hp-value: 4is-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-hpis-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
Code (YAML):conditions:
is-above-hp: victim
is-above-hp-value: 4is-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-hphas-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
Code (YAML):conditions:
has-armor-helmet: player
has-armor-helmet-items: AIR
Code (YAML):conditions:
has-armor-helmet: victim
has-armor-helmet-items:
- IRON_HELMET
- DIAMOND_HELMEThas-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-helmethas-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
Code (YAML):conditions:
has-armor-chestplate: player
has-armor-chestplate-items: AIR
Code (YAML):conditions:
has-armor-chestplate: victim
has-armor-chestplate-items:
- IRON_CHESTPLATE
- DIAMOND_CHESTPLATEhas-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-chestplatehas-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
Code (YAML):conditions:
has-armor-leggings: player
has-armor-leggings-items: AIR
Code (YAML):conditions:
has-armor-leggings: victim
has-armor-leggings-items:
- IRON_LEGGINGS
- DIAMOND_LEGGINGShas-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-leggingshas-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
Code (YAML):conditions:
has-armor-boots: player
has-armor-boots-items: AIR
Code (YAML):conditions:
has-armor-boots: victim
has-armor-boots-items:
- IRON_BOOTS
- DIAMOND_BOOTShas-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-bootsholds-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
Code (YAML):conditions:
holds-item-main: AIR
Code (YAML):conditions:
holds-item-main: non-emptyholds-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
Code (YAML):conditions:
holds-item-offhand: AIR
Code (YAML):conditions:
holds-item-offhand: non-emptyis-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
Code (YAML):event: damage-take
conditions:
is-damage-cause:
- ENTITY_ATTACK
- ENTITY_SWEEP_ATTACK
prizes:
reduce-damage: 50.0is-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
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-causeis-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
Code (YAML):event: consume
conditions:
is-food:
- COOKIE
- APPLEis-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
Code (YAML):event: consume
conditions:
is-potion:
- INSTANT_HEAL
- REGENis-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: trueis-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
Code (YAML):conditions:
is-in-world:
- nether
- endjavascript-condition(top)
Description: Checks a given condition is met. All PlaceholderAPI's placeholders are replaced with the prefixed player or victim: {player}%placeholder% or {victim}%placeholder%. Check examples
Possible values: string
Examples:
Activates the perk only if the player is under y level 50 and if his exp level is less than 5.
Code (YAML):conditions:
javascript-condition: "{player}%player_level% < 10 && {player}%player_y% <= 50"
Code (YAML):conditions:
javascript-condition: "'{player}%skywars_selected_kit%' === 'miner' || '{player}%skywars_selected_kit%' === 'hunter'
Code (YAML):conditions:
javascript-condition: "{victim}%factions_power% === {victim}%factions_powermax%"
Code (YAML):conditions:
javascript-condition: "{victim}'%essentials_afk%' === 'true'
Code (YAML):conditions:
javascript-condition: "{player}%factions_power% > {victim}%factions_power%"bow-not-infinite(top)
Description: Checks if the bow has infinity enchant and if it does, the perk won't activate
Possible values: true or false
Must be used with: hit-arrow events
Examples:
Checks if the bow has infinity enchant and if it does, the perk won't activate
Code (YAML):event: hit-arrow-entity
conditions:
bow-has-infinity: trueis-material(top)
Description: Checks if the broken block is listed<- Back to the main page
Possible values: any minecraft item
Must be used with: break or place events
Examples:
Check if the broken block is wood or stone
Code (YAML):event: break
conditions:
is-material:
- WOOD
- STONE
- Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM