... | @@ -19,36 +19,36 @@ Links to triggers added by addon plugins. Any triggers from these links will not |
... | @@ -19,36 +19,36 @@ Links to triggers added by addon plugins. Any triggers from these links will not |
|
# Triggers
|
|
# Triggers
|
|
**Table of all available triggers:**
|
|
**Table of all available triggers:**
|
|
| Trigger | When it fires... |
|
|
| Trigger | When it fires... |
|
|
|----------------------------------------|--------------------------------------------------------------|
|
|
|----------------------------------------|---------------------------------------------------------------|
|
|
| onCombat | Default |
|
|
| [onCombat](/Skills/Triggers/onCombat) | Default |
|
|
| [onAttack](#onattack) | When the mob hits something |
|
|
| [onAttack](/Skills/Triggers/onattack) | When the mob hits something |
|
|
| [onDamaged](#ondamaged) | When the mob is damaged |
|
|
| [onDamaged](/Skills/Triggers/ondamaged) | When the mob is damaged |
|
|
| [onSpawn](#onspawn) | When the mob spawns |
|
|
| [onSpawn](/Skills/Triggers/onspawn) | When the mob spawns |
|
|
| [onDespawn](#ondespawn) | When the mob is despawned |
|
|
| [onDespawn](/Skills/Triggers/ondespawn) | When the mob is despawned |
|
|
| [onReady / onFirstSpawn](#onready) | Triggered the first time a mob is spawned from a spawner |
|
|
| [onReady / onFirstSpawn](/Skills/Triggers/onready) | Triggered the first time a mob is spawned from a spawner |
|
|
| [onLoad](#onload) | When the mob is loaded after a server restart |
|
|
| [onLoad](/Skills/Triggers/onload) | When the mob is loaded after a server restart |
|
|
| [onSpawnOrLoad](#onspawnorload) | When the mob either [spawns](#onspawn) or [loads](#onload) |
|
|
| [onSpawnOrLoad](/Skills/Triggers/onspawnorload) | When the mob either [spawns](/Skills/Triggers/onspawn) or [loads](/Skills/Triggers/onload) |
|
|
| [onDeath](#ondeath) | When the mob dies |
|
|
| [onDeath](/Skills/Triggers/ondeath) | When the mob dies |
|
|
| [onTimer:*#*](#ontimerticks) | Every \# ticks (where \# is the interval in ticks) |
|
|
| [onTimer:*#*](/Skills/Triggers/ontimerticks) | Every \# ticks (where \# is the interval in ticks) |
|
|
| [onInteract](#oninteract) | When the mob is right-clicked |
|
|
| [onInteract](/Skills/Triggers/oninteract) | When the mob is right-clicked |
|
|
| [onPlayerKill](#onplayerkill) | When the mob kills a player |
|
|
| [onPlayerKill](/Skills/Triggers/onplayerkill) | When the mob kills a player |
|
|
| [onEnterCombat](#onentercombat) | When the mob enters combat (requires threat tables be on) |
|
|
| [onEnterCombat](/Skills/Triggers/onentercombat) | When the mob enters combat (requires threat tables be on) |
|
|
| [onDropCombat](#ondropcombat) | When the mob leaves combat (requires threat tables be on) |
|
|
| [onDropCombat](/Skills/Triggers/ondropcombat) | When the mob leaves combat (requires threat tables be on) |
|
|
| [onChangeTarget](#onchangetarget) | When the mob changes targets (requires threat tables be on) |
|
|
| [onChangeTarget](/Skills/Triggers/onchangetarget) | When the mob changes targets (requires threat tables be on) |
|
|
| [onExplode](#onexplode) | When the mob explodes (typically only used for creepers) |
|
|
| [onExplode](/Skills/Triggers/onexplode) | When the mob explodes (typically only used for creepers) |
|
|
| [onPrime](#onprime) | When the creeper charges up for an explosion |
|
|
| [onPrime](/Skills/Triggers/onprime) | When the creeper charges up for an explosion |
|
|
| [onCreeperCharge](#oncreepercharge) | When the creeper is charged (when lightning hits a creeper) |
|
|
| [onCreeperCharge](/Skills/Triggers/oncreepercharge) | When the creeper is charged (when lightning hits a creeper) |
|
|
| [onTeleport](#onteleport) | When the mob teleports (typically only used for endermen) |
|
|
| [onTeleport](/Skills/Triggers/onteleport) | When the mob teleports (typically only used for endermen) |
|
|
| [onSignal:*[signal]*](#onsignalsignal) | When the mob receives a signal |
|
|
| [onSignal:*[signal]*](/Skills/Triggers/onsignalsignal) | When the mob receives a signal |
|
|
| [onShoot](#onshoot) | When the mob fires a projectile |
|
|
| [onShoot](/Skills/Triggers/onshoot) | When the mob fires a projectile |
|
|
| [onBowHit](#onbowhit) | When the mob's fired projectile hits an entity |
|
|
| [onBowHit](/Skills/Triggers/onbowhit) | When the mob's fired projectile hits an entity |
|
|
| [onTame](#ontame) | When the mob gets tamed |
|
|
| [onTame](/Skills/Triggers/ontame) | When the mob gets tamed |
|
|
| [onBreed](#onbreed) | When the mob breeds with another mob. |
|
|
| [onBreed](/Skills/Triggers/onbreed) | When the mob breeds with another mob. |
|
|
| [onTrade](#ontrade) | When the Villager completes a trade. Requires Paper |
|
|
| [onTrade](/Skills/Triggers/ontrade) | When the Villager completes a trade. Requires Paper |
|
|
| [onChangeWorld](#onchangeworld) | When the mob changes world |
|
|
| [onChangeWorld](/Skills/Triggers/onchangeworld) | When the mob changes world |
|
|
| [onBucket](#onbucket) |When the cow is milked or an entity is bucketed (axolotl etc.)|
|
|
| [onBucket](/Skills/Triggers/onbucket) |When the cow is milked or an entity is bucketed (axolotl etc.)|
|
|
| [onSkillDamage](#onskilldamage) | When the mob deals damage to other entities via a mechanic |
|
|
| [onSkillDamage](/Skills/Triggers/onskilldamage) | When the mob deals damage to other entities via a mechanic |
|
|
| [onHear](#onhear) | When the mob hears a sound, [if enabled](/Mobs/Mobs#hearing) |
|
|
| [onHear](/Skills/Triggers/onhear) | When the mob hears a sound, [if enabled](/Mobs/Mobs#hearing) |
|
|
|
|
|
|
<!--
|
|
<!--
|
|
ADD THIS TRIGGER BACK WHEN IT WORKS
|
|
ADD THIS TRIGGER BACK WHEN IT WORKS
|
... | @@ -101,13 +101,14 @@ damage when it is between 10% and 90% health. |
... | @@ -101,13 +101,14 @@ damage when it is between 10% and 90% health. |
|
|
|
|
|
# The @trigger Targeter
|
|
# The @trigger Targeter
|
|
|
|
|
|
You may have noticed there is an `@trigger` targeter in the examples
|
|
You may have noticed there is an [`@trigger`](/Skills/Targeters/Trigger) targeter in the examples
|
|
shown above, and listed in the [targeters](/Skills/Targeters) section. The `@trigger` will target the
|
|
shown above, and listed in the [targeters](/Skills/Targeters) section. The `@trigger` will target the
|
|
entity that "caused" the skill to trigger, i.e. when a player damages a mob and
|
|
entity that "caused" the skill to trigger, i.e. when a player damages a mob and
|
|
that mob has an ~onDamaged skill, it will target that player.
|
|
that mob has an ~onDamaged skill, it will target that player.
|
|
If a signal is being sent to a mob, it will target the mob that sent
|
|
If a signal is being sent to a mob, it will target the mob that sent
|
|
the signal, and so on.
|
|
the signal, and so on.
|
|
|
|
|
|
|
|
<!--
|
|
# All Available Triggers
|
|
# All Available Triggers
|
|
#### ~onSpawn
|
|
#### ~onSpawn
|
|
Executes the skill when the mob spawns.
|
|
Executes the skill when the mob spawns.
|
... | @@ -459,7 +460,7 @@ EXAMPLE_MOB: |
... | @@ -459,7 +460,7 @@ EXAMPLE_MOB: |
|
```
|
|
```
|
|
|
|
|
|
#### ~onSpawnOrLoad
|
|
#### ~onSpawnOrLoad
|
|
Executes the skill when either [~onSpawn](#onspawn) or [~onLoad](#onload) would trigger.
|
|
Executes the skill when either [~onSpawn](/Skills/Triggers/onspawn) or [~onLoad](/Skills/Triggers/onload) would trigger.
|
|
```yml
|
|
```yml
|
|
EXAMPLE_MOB:
|
|
EXAMPLE_MOB:
|
|
Type: VILLAGER
|
|
Type: VILLAGER
|
... | @@ -527,6 +528,8 @@ ICanHearYou: |
... | @@ -527,6 +528,8 @@ ICanHearYou: |
|
- message{m="I can hear you <trigger.name>! <skill.var.volume>? Way too loud!"} @trigger ~onHear
|
|
- message{m="I can hear you <trigger.name>! <skill.var.volume>? Way too loud!"} @trigger ~onHear
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<!-- LINKS -->
|
|
<!-- LINKS -->
|
|
[ThreatTables]: /Mobs/ThreatTables
|
|
[ThreatTables]: /Mobs/ThreatTables
|
... | | ... | |