Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 144
    • Issues 144
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
  • Triggers

Triggers · Changes

Page history
added back trigger table authored Dec 31, 2022 by Phillip's avatar Phillip
Hide whitespace changes
Inline Side-by-side
Showing with 63 additions and 28 deletions
+63 -28
  • Skills/Triggers.md Skills/Triggers.md +63 -28
  • No files found.
Skills/Triggers.md
View page @ 92b98861
...@@ -7,34 +7,36 @@ itself. ...@@ -7,34 +7,36 @@ itself.
**Table of all available triggers:** **Table of all available triggers:**
| Trigger | When it fires... | | Trigger | When it fires... |
|------------------------|--------------------------------------------------------------| |----------------------------------------|--------------------------------------------------------------|
| onCombat | Default | | onCombat | Default |
| [onAttack](#~onAttack) | When the mob hits something | | [onAttack](#onattack) | When the mob hits something |
| onDamaged | When the mob is damaged | | [onDamaged](#ondamaged) | When the mob is damaged |
| onSpawn | When the mob spawns | | [onSpawn](#onspawn) | When the mob spawns |
| onDespawn | When the mob is despawned | | [onDespawn](#ondespawn) | When the mob is despawned |
| onFirstSpawn | Triggered the first time a mob is spawned from a spawner | | [onReady](#onready) | Triggered the first time a mob is spawned from a spawner |
| onLoad | When the mob is loaded (spawning or loading after a restart) | | [onLoad](#onload) | When the mob is loaded (spawning or loading after a restart) |
| onDeath | When the mob dies | | [onDeath](#ondeath) | When the mob dies |
| onTimer:*#* | Every \# ticks (where \# is the interval in ticks) | | [onTimer:*#*](#ontimerticks) | Every \# ticks (where \# is the interval in ticks) |
| onInteract | When the mob is right-clicked | | [onInteract](#oninteract) | When the mob is right-clicked |
| onKill | When something kills a mob | | [onPlayerKill](#onplayerkill) | When the mob kills a player |
| onKillPlayer | When the mob kills a player | | [onEnterCombat](#onentercombat) | When the mob enters combat (requires threat tables be on) |
| onPlayerDeath | When a player dies for any reason | | [onDropCombat](#ondropcombat) | When the mob leaves combat (requires threat tables be on) |
| onEnterCombat | When the mob enters combat (requires threat tables be on) | | [onChangeTarget](#onchangetarget) | When the mob changes targets (requires threat tables be on) |
| onDropCombat | When the mob leaves combat (requires threat tables be on) | | [onExplode](#onexplode) | When the mob explodes (typically only used for creepers) |
| onChangeTarget | When the mob changes targets (requires threat tables be on) | | [onPrime](#onprime) | When the creeper charges up for an explosion |
| onExplode | When the mob explodes (typically only used for creepers) | | [onTeleport](#onteleport) | When the mob teleports (typically only used for endermen) |
| onPrime | When the creeper charges up for an explosion | | [onSignal:*[signal]*](#onsignalsignal) | When the mob receives a signal |
| onTeleport | When the mob teleports (typically only used for endermen) | | [onShoot](#onshoot) | When the mob fires a projectile |
| onSignal | When the mob receives a signal | | [onTame](#ontame) | When the mob gets tamed |
| onSignal:*[signal]* | When the mob receives a specific signal | | [onBreed](#onbreed) | When the mob breeds with another mob. |
| onShoot | When the mob fires a projectile | | [onTrade](#ontrade) | When the Villager completes a trade. Requires Paper |
| onTame | When the mob gets tamed |
| onBreed | When the mob breeds with another mob. | <!--
| onTrade | When the Villager completes a trade. Requires Paper | ADD THIS TRIGGER BACK WHEN IT WORKS
| onKill | When something kills a mob |
-->
Using Triggers Using Triggers
-------------- --------------
...@@ -141,6 +143,17 @@ EXAMPLE_MOB: ...@@ -141,6 +143,17 @@ EXAMPLE_MOB:
- message{m=DAMAGED} @World ~onDamaged - message{m=DAMAGED} @World ~onDamaged
``` ```
#### ~onDespawn
Executes the skill when the mob despawns.
```yml
EXAMPLE_MOB:
Type: CHICKEN
Skills:
# sends a message to all the players in the world
# when the mob takes damage
- message{m=DESPAWNED} @World ~onDespawn
```
#### ~onExplode #### ~onExplode
Executes the skill when the mob explodes. Executes the skill when the mob explodes.
Generally, this trigger only works with creepers and TNTs since other mobs tend to not explode... Generally, this trigger only works with creepers and TNTs since other mobs tend to not explode...
...@@ -328,3 +341,25 @@ EXAMPLE_MOB: ...@@ -328,3 +341,25 @@ EXAMPLE_MOB:
# when the mob's target changes # when the mob's target changes
- message{m=TRADED} @World ~onTrade - message{m=TRADED} @World ~onTrade
``` ```
#### ~onReady
Executes the skill when the mob is ready to spawn from a [spawner](Spawners)
```yml
EXAMPLE_MOB:
Type: VILLAGER
Skills:
# sends a message to all the players in the world
# when the mob is about to spawn from a spawner
- message{m=READY TO SPAWN FROM A SPAWNER} @World ~onReady
```
#### ~onLoad
Executes the skill when the mob is loaded after a server restart.
```yml
EXAMPLE_MOB:
Type: VILLAGER
Skills:
# sends a message to all the players in the world
# when the mob is loaded after a server restart
- message{m=LOADED} @World ~onLoad
```
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Mythic Add-ons
Compatible Plugins
API Information
Packs
Mobs
  • Mob Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Effects
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Placeholders
  • Variables
  • Math
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drop Types
Spawning
  • Spawners
  • Random Spawns
Examples