Triggers
Triggers represent events. When they are verified, other mechanics are triggered such as conditions, chances and mana verification. If all of them are verified, effects are launched.
Available triggers
Some triggers are taking parameters, they are mandatory and won't work if they are not present. You can add as many as you want.
The format with parameters is : trigger<parameter1, parameter2, ...>
The format without parameters is : trigger
When adding parameters to a trigger, it means another case could be verified with this trigger.
As an example hit<passive, magma_cube>
will be verified when a player hit a passive mob or a magma cube.
🔴hit
(with parameters)
hit
(with parameters)The hit trigger is verified when the player is hitting another entity.
Available parameters are :
all : verified for every entity
passive : verified for every passive entity
hostile : verified for every hostile entity
mobs : verified for every mob
<every_entity> : verified for this entity (list can be found here).
🔴distance_hit
(with parameters)
distance_hit
(with parameters)The distance hit trigger is verified when the player throw an arrow (from bow or crossbow) or a trident.
Available parameters are the same as Hit.
🔴world_damage
(with parameters)
world_damage
(with parameters)The world damage trigger is verified when the player receives damages from the world.
Available parameters are :
all : verified for every damage cause
<every_damage_cause> : verified for this damage cause (they can be found here).
🔴distance_hit_block
(with parameters)
distance_hit_block
(with parameters)The distance hit block trigger is verified when the projectile thrown by the player hits a block.
Available parameters are :
all : verified for every block material
<every_block_material> : verified for this block material (list can be found here).
🔴receive_damage
(with parameters)
receive_damage
(with parameters)The receive damage trigger is verified when the player receive damages from another entity.
Available parameters are :
all : verified for every entity
mobs : verified for every mob
hostile : verified for every hostile mob
thrown_trident : verified for a thrown trident
arrow : verified for an arrow
player : verified for player (either by melee or projectile)
axes : verified if the ennemy is a player with axe
swords : verified if the ennemy is a player with sword
<every_entity_type> : verified for the entity (either by melee or projectile), entities can be found here
<every_weapon_material> : verified if the ennemy is a player with the choosen weapon in hand, weapon materials can be found here.
🔴death
(with parameters)
death
(with parameters)The death trigger is verified when the player dies.
Available parameters are :
all : verified all the time
axes : verified when the player was killed by another player with an axe
swords : verified when the player was killed by another player with a sword
mobs : verified when the player was killed by a mob
<damage_cause> : verified when the player was killed by this damage cause (the list can be found here).
🔴kill
(with parameters)
kill
(with parameters)The kill trigger is verified when the player kills another entity.
Available parameters are :
all : verified all the time
hostile : verified for every hostile mob
mobs : verified for every mob
passive : verified for every passive entity
<every_entity_type> : verified for the entity, entities can be found here
🔴permanent
(without parameters)
permanent
(without parameters)This trigger is only for permanent effects (see Effects). It does not require any parameter as it's active all the time.
🔴exp_earning
(without parameters)
exp_earning
(without parameters)This trigger is verified when the player receives experience.
🔴item_break
(without parameters)
item_break
(without parameters)This trigger is verified when one of the player's item breaks.
🔴break_block
(with parameters)
break_block
(with parameters)This trigger is verified when the player breaks a block.
Available parameters are :
leaves : verified for every leaves
log : verified for every log
wood : verified for every wood
<every_material> : verified for this material, list can be found here.
🔴throw_weapon
(with parameters)
throw_weapon
(with parameters)The trigger is verified when the player throws a projectile.
Available parameters are :
all : verified for every projectile
trident : when a trident is thrown
arrow : when an arrow is thrown (from bow or crossbow)
🔴shield_block
(with parameters)
shield_block
(with parameters)The trigger is verified when the player is blocking attack with shield.
Available parameters are :
all : verified all the time
mobs : verified for every mob
thrown_trident : verified for a thrown trident
arrow : verified for an arrow
player : verified for player (either by melee or projectile)
axes : verified if the ennemy is a player with axe
swords : verified if the ennemy is a player with sword
<every_entity_type> : verified for the entity (either by melee or projectile), entities can be found here
<every_weapon_material> : verified if the ennemy is a player with the choosen weapon in hand, weapon materials can be found here.
🔴eat
(with parameters)
eat
(with parameters)This trigger is verified when the player eats something.
Available parameters are :
all : verified for every food
<every_material> : verified for this food material, list can be found here.
🔴fish
(with parameters)
fish
(with parameters)This trigger is verified when the player fish.
Available parameters are :
all : verified for any fished material
<every_material> : verified for this fished material, list can be found here.
🔴active
(without parameters)
active
(without parameters)This trigger is verified when the player is pressing shift + right click
🔴propulsion
(with parameters)
propulsion
(with parameters)This trigger is verified when the player is gliding (with elytra) and right clicking.
Available parameters are :
all : verified all the time, no matter which object the player has in hand
<every_material> : verified when the player has this material in hand, list can be found here.
🔴durability_decrease
(without parameters)
durability_decrease
(without parameters)This trigger is verified when one of the player items loses durability
🔴potion_effect
(with parameters)
potion_effect
(with parameters)This trigger is verified when the player receives a new potion effect
Available parameters are :
all : verified for every potion effect
bad : verified for every bad potion effect
good : verified for every good potion effect
<every_potion_effect> : verified for this potion effect (list can be found here)
🔴mana_decrease
(without parameters)
mana_decrease
(without parameters)This trigger is verified when the player's mana decreases.
🔴mana_increase
(without parameters)
mana_increase
(without parameters)This trigger is verified when the player's mana increases.
🔴regain_health
(with parameters)
regain_health
(with parameters)This trigger is verified when the player regain health.
Available parameters are :
all : verified all the time
<every_regain_reason> : verified when the player regain health for this reason (list can be found here)
Muliple triggers
You can add multiple triggers on the same file, to do so, replace the trigger
parameter by triggers
to set it as a list. You can now declare multiple triggers.
The syntax for multiple triggers is the following :
<trigger_name>:trigger
for trigger without parameters<trigger_name>:trigger<param1, param2, ...>
for trigger with parameters
Adding multiple triggers to one file allows you to have multiple ways to launch effect. To do so you have to use named syntax for Chances and for Effects.
If you use multiple triggers, you have to change the syntax to have named chances and named effects, otherwise the file won't be loaded.
Last updated