# Triggers

Triggers are the events that will activate an ability. Examples of triggers include a player attacking another player, a mob taking damage, they can be environmental events, or a block being broken. Triggers can also have their own parameters, such as a specific type of damage or a certain block material.

Triggers are events that activate abilities in the system. When a trigger occurs, the system checks for any abilities that are set to activate on that trigger and performs the corresponding effects.

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>

### External Triggers

Here are the external triggers, which depend on other plugins or systems to work

<table data-full-width="true"><thead><tr><th width="243">Name</th><th width="307.3333333333333">Description</th><th>For plugin</th></tr></thead><tbody><tr><td>CUSTOM_MOB_DEFENSE</td><td>Activates when a custom mob is hit</td><td>AdvancedMobs</td></tr></tbody></table>

### Internal Triggers

Here is a list of all the default available triggers, along with a brief description of each:

{% hint style="info" %}
**MINING**, **ATTACK** and **ATTACK\_MOB** triggers do not work with off-hand items.
{% endhint %}

<table data-full-width="true"><thead><tr><th width="291.5">Name</th><th>Description</th></tr></thead><tbody><tr><td>ATTACK</td><td>Activates when a player/mob hits a player</td></tr><tr><td>ATTACK_MOB</td><td>Activates when a player/mob hits a mob</td></tr><tr><td>ARROW_HIT</td><td>Activates when an arrow hits an entity</td></tr><tr><td>BOW_FIRE</td><td>Activates when a bow is fired full power</td></tr><tr><td>BITE_HOOK</td><td>Activates when fish bites fishing hook (or item gets caught on it)</td></tr><tr><td>BREW_POTION</td><td>Activates when player brews a potion (variables: %potion type%, %is extended%, %is upgraded%)</td></tr><tr><td>CATCH_FISH</td><td>Activates when a player catches a fish (does not activate with entities)</td></tr><tr><td>COMMAND</td><td>Activates when player runs a command. Specify a command at the same block as chances, cooldowns are set, example here:<br><code>chance: 100</code><br><code>cooldown: 0</code><br><code>command: exampleCommand</code></td></tr><tr><td>HOOK_ENTITY</td><td>Activates when player hooks an entity with a fishing rod</td></tr><tr><td>DEATH</td><td>Activates when a player or mob dies</td></tr><tr><td>DEFENSE</td><td>Activates when a player/mob is hit by a player</td></tr><tr><td>DEFENSE_MOB</td><td>Activates when a player/mob is hit by a mob</td></tr><tr><td>DEFENSE_MOB_PROJECTILE</td><td>Activates when a player/mob is hit by a projectile from a mob</td></tr><tr><td>DEFENSE_PROJECTILE</td><td>Activates when a player/mob is hit by a projectile from a player</td></tr><tr><td>EAT</td><td>Activates when a player eats</td></tr><tr><td>ELYTRA_FLY</td><td>Activates when an entity starts flying with an elytra</td></tr><tr><td>EXPLOSION</td><td>Activates when an entity takes explosion damage</td></tr><tr><td>FALL_DAMAGE</td><td>Activates when an entity takes fall damage</td></tr><tr><td>ELYTRA_FLY_DAMAGE</td><td>Activates when entity takes damage while flying with elytra</td></tr><tr><td>FIRE</td><td>Activates when an entity takes fire damage</td></tr><tr><td>HELD</td><td>Activates when player holds an item</td></tr><tr><td>ITEM_BREAK</td><td>Activates when a player breaks an item</td></tr><tr><td>JUMP</td><td>Activates when a player jumps</td></tr><tr><td>JOIN</td><td>Activates when any player joins (on all items)</td></tr><tr><td>QUIT</td><td>Activates when any player leaves (on all items)</td></tr><tr><td>KILL</td><td>Activates when any entity kills another entity</td></tr><tr><td>KILL_MOB</td><td>Activates when any entity kills a mob</td></tr><tr><td>KILL_PLAYER</td><td>Activates when any entity kills a player</td></tr><tr><td>MINING</td><td>Activates when a block is broken</td></tr><tr><td>PASSIVE_DEATH</td><td>Activates when an entity is struck by lightning</td></tr><tr><td>RIGHT_CLICK</td><td>Activates when a player right clicks blocks, air</td></tr><tr><td>RIGHT_CLICK_ENTITY</td><td>Activates when player right clicks entity</td></tr><tr><td>ROD_CAST</td><td>Activates when a player casts their fishing rod</td></tr><tr><td>SHOOT</td><td>Activates when a player/mob shoots a player</td></tr><tr><td>SHOOT_MOB</td><td>Activates when a player/mob shoots a mob</td></tr><tr><td>SWING</td><td>Activates when a player swings their held item</td></tr><tr><td>SHIELD_BLOCK</td><td>Activates when a player blocks with a shield</td></tr><tr><td>HORN</td><td>Activates when player blows a horn</td></tr><tr><td>EFFECT_STATIC</td><td>Activates when a player equips or unequips armor</td></tr><tr><td>REPEATING</td><td>Repeatingly activates effects. Must set <code>time</code>settings in the same block as effects list. If you don't wish the effect to apply immediately, you must set <code>instantApply</code> setting to <code>false</code> in the same block as effects list. That will respect the <code>time</code> setting for apply delay.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.advancedplugins.net/abilities/triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
