Conditions Variables

Dynamic variables to be used in conditions and abilities.

Conditions can be targeted against different entities. You can use attacker or victim instead of player, for example: %player health% -> %victim health%.

List of built-in variables

All variables can start with 'player', 'attacker', and 'victim' Example: '%victim is on fire%'

Parsing for attacker or victim works for placeholders from PlaceholderAPI as well. Example: "%victim checkitem_getinfo:39_mat:%"

Player only variables

Variable

Description

%can break%

True if a player can break the block

%faction land%

Gets faction land player is in.

%food%

Food level of player

%is bleeding%

True if the player is bleeding via McMMO

%helmet%

Equipped Helmet

%chestplate%

Equipped Chestplate

%leggins%

Equipped Leggins

%boots%

Equipped Boots

%is blocking%

True if the player is blocking

%is flying%

True if the player is flying

%is sneaking%

True if the player is sneaking

%level of skill <skill>%

Level of a player's McMMO skill

%permissions%

All player's permissions

%is op%

True if player has OP

Global Variables

Variable

Description

%block below%

Block type player/ mob is standing on

%trigger type%

Type of trigger

%combo%

Current combo

%custom name%

Custom name of player/ mob

%has enchantment in hand of <enchant>%

Whether player/ mob has an enchantment on the item in its main hand

%has enchantment in hand of <enchant> level <level>%

Whether player/ mob has an enchantment of a specific level on the item in its main hand

%has enchantment in <armor slot> of <enchantment>%

Whether player/ mob has an enchantment on the item in a specific armor slot

%has potion effect <effect>%

Whether player/ mob has a potion effect PotionEffectTypes

%item in hand level <enhantment>%

Level of enchantment on item in main hand

%health%

The health of player/ mob

%health percentage%

Percentage of health left

%is critical%

Whether attack was a critical hit

%is gliding%

Whether player/ mob is gliding

%is holding%

Type of item currently held by player/ mob

%is hostile%

Whether mob is hostile

%is on fire%

Whether player/ mob is on fire

%is removal%

Whether effect is removal (EFFECT_STATIC, HELD, SHIFT, SPRINT)

%is under water%

Whether player/ mob is underwater

%item slot%

Slot of item that triggered enchant

%max health%

Maximum health of player/ mob

%mob type%

Type of mob

%name%

Name of player/ mob

%nearby mobs%

Amount of mobs in a 10 block radius

%offhand item%

Type of item currently held in offhand by player/ mob

%players%

Amount of players in a 10 block radius

%potion effect level <effect> <level>%

Whether player/ mob has a potion effect of a specifc level

%time%

Time of the world

%x%

X coordinate of player/ mob

%y%

Y coordinate of player/ mob

%z%

Z coordinate of player/ mob

%x double%

More precise X coordinate of player/ mob

%y double%

More precise Y coordinate of player/ mob

%z double%

More precise Z coordinate of player/ mob

%block tags%

Array of tags a target block has

%is riding%

Whether player/mob is riding player/mob (or is a passenger)

%passengers%

Passengers of the player/mob

Type-specific variables (global)

Variable

Description

Applicable Type(s)

%is headshot%

Whether an arrow/ trident hit was a headshot

BOW, BOW_MOB, DEFENSE_BOW, DEFENSE_BOW_MOB

%force%

Force of bow when firing arrow

BOW_FIRE

%damaged from behind%

If victim was damaged from behind by enemy

DEFENSE, DEFENSE_MOB, DEFENSE_BOW, DEFENSE_BOW_MOB

%projectile type%

Type of projectile ("arrow" or "trident")

BOW, BOW_MOB, DEFENSE_BOW, DEFENSE_BOW_MOB

%exp%

Amount of EXP to give/ drop

CATCH_FISH, FISHING, KILL_MOB

%caught%

Type of item player caught

CATCH_FISH, FISHING

%maximum durability%

Maximum durability of item

ITEM_BREAK

%block x%

X coordinate of block broken

MINING

%block y%

Y coordinate of block broken

MINING

%block z%

Z coordinate of block broken

MINING

%block type%

Type of block

MINING, SWING

%block type lowercase%

Type of block but all letters are lowercase

MINING

%block drop type%

Type of item block will drop

MINING

%is crop%

Whether broken block was a crop

MINING

%is fully grown%

Whether broken crop was fully grown

MINING

%block location%

Location of the block (used in location parameter)

MINING, SWING

%damage%

Final damage

Any type triggered by damage or an attack

%raw damage%

Damage before armor

Any type triggered by damage or an attack

%damage cause%

Cause of damage

Any type triggered by damage or an attack

PlaceholderAPI support

E.g: %victim player_level% > 10 : %stop%, player_level is a PlaceholderAPI placeholder %player_level%.

You can use %player %, %attacker % or%victim %

It's a must to remove percentage signs from PlaceholderAPI placeholders, more examples: %server_online% -> server_online -> %player server_online% > 5 : %allow%

Last updated