Addons can register their own mechanics, conditions, targeters, and placeholders using the same annotation-based system Mythic uses internally, plus custom triggers. Add MythicMobs to `depend` (or `softdepend`) in your `plugin.yml` first.
### Custom Mechanics
A mechanic is a class annotated with `@MythicMechanic`, extending `SkillMechanic`, and implementing one of the dispatch interfaces:
The constructor must match the superclass signature `(SkillExecutor, File, String, MythicLineConfig)`. Read your attributes from the `MythicLineConfig`.
Both are picked up by the same package scan shown below.
### Registering Mechanics, Conditions & Targeters
Create a `CustomComponentRegistry` pointing at the package(s) holding your annotated classes. The constructor automatically scans for mechanics, conditions, targeters, and drops:
```java
// in your plugin's onEnable(), after MythicMobs is enabled
Placeholders use the `@MythicPlaceholder` annotation and are registered with the `PLACEHOLDER` component type. They are **not** picked up by the base package scan, so register them explicitly:
See the full [Placeholders API](/API/Placeholders) page for how to write a placeholder class, fetch arguments, and use the scoped and wildcard variants.
### Custom Triggers
A trigger is a `SkillTrigger` created with a name and optional aliases, then registered:
Call `MyTriggers.register()` in your `onEnable()`. In mob configs the trigger is referenced by adding the `~on` prefix to the registered name — Mythic strips `~on` and matches the rest case-insensitively. So `CUSTOMEVENT` is used as `~onCustomEvent`, and the alias `MYEVENT` as `~onMyEvent`.
To make a mob's skills with that trigger actually fire, dispatch it through the event bus. The caster is the `SkillCaster` running the skill (an `ActiveMob` is a `SkillCaster`); `triggerEntity` is the entity that caused it, or `null`:
```java
ActiveMobmob=...;// your MythicMob (implements SkillCaster)
AbstractEntitytriggerEntity=...;// the cause, may be null
| [MythicReloadedEvent](/api/events/MythicReloadedEvent) | Called when the plugin is reloaded |
| [MythicMobSpawnEvent](/api/events/MythicMobSpawnEvent) | Called when a MythicMob spawns |
| [MythicMobDeathEvent](/api/events/MythicMobDeathEvent) | Called when a MythicMob dies |
| [MythicMobDespawnEvent](/api/events/MythicMobDespawnEvent) | Called when a MythicMob despawns without dying |
| [MythicMobLootDropEvent](/api/events/MythicMobLootDropEvent) | Called right before a loot table is generated |
| [MythicConditionLoadEvent](/api/events/MythicConditionLoadEvent) | Called when a custom condition is loaded |
| [MythicDropLoadEvent](/api/events/MythicDropLoadEvent) | Called when a custom drop is loaded |
| [MythicMechanicLoadEvent](/api/events/MythicMechanicLoadEvent) | Called when a custom mechanic is loaded |
| [MythicTargeterLoadEvent](/api/events/MythicTargeterLoadEvent) | Called when a custom targeter is loaded |
-->
\ No newline at end of file
The Mythic API exposes the following Bukkit events. Full method signatures and fields are documented in the [JavaDocs](https://www.mythiccraft.io/javadocs/mythic/). A checkmark in the *Cancellable* column means the event implements `Cancellable`.
### Reload & Lifecycle
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicPreReloadEvent | Fired at the start of the reload command before reload work begins. | |
| MythicReloadEvent | Fired after Mythic reloads configuration in reload stage one. | |
| MythicReloadedEvent | Fired after reload stage two completes and clocks are reloaded. | |
| MythicPostReloadedEvent | Fired after MythicReloadedEvent during reload stage two. | |
| MythicReloadCompleteEvent | Fired at the end of reload processing after completion messaging. | |
### Config Loading
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicConditionLoadEvent | Requests a custom condition implementation for a config entry. | |
| MythicMechanicLoadEvent | Requests a custom mechanic implementation for a config entry. | |
| MythicTargeterLoadEvent | Requests a custom targeter implementation for a config entry. | |
| MythicDropLoadEvent | Requests a custom drop implementation for a config entry. | |
| MythicPlaceholdersLoadEvent | Event fired as MythicMobs registers placeholders, before it finalizes them | |
| MythicStatsRegistrationEvent | Fired after Mythic registers its built-in primary stats. | |
| MythicMenusPreLoadEvent | Fired immediately before Mythic loads custom menu configs. | |
### Mobs
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicMobPreSpawnEvent | Fired before Mythic attempts to spawn a mob entity. | yes |
| MythicMobPreSpawnConfigureEvent | Called when a MythicMob is about to be spawned and currently in pre-spawn configuration stage | |
| MythicMobSpawnEvent | Fired after a Mythic mob entity is created and wrapped, but before registration. | yes |
| MythicMobDeathEvent | Fired for active Mythic mobs during Bukkit death handling. | |
| MythicMobDespawnEvent | Fired when an active Mythic mob despawns through Mythic's despawn handler. | |
| MythicMobInteractEvent | Fired when a player right-clicks an active Mythic mob. | |
| MythicMobEggEvent | Fired when a player uses a Mythic egg item. | yes |
| MythicMobLootDropEvent | Fired when Mythic has generated a loot bag for a mob death context. | |
| MythicMobItemGenerateEvent | Fired when a Mythic item definition has been materialized into a Bukkit stack. | |
### Combat & Skills
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicDamageEvent | Fired when a Mythic damage mechanic prepares to apply damage to a target. | yes |
| MythicHealMechanicEvent | Fired when a Mythic healing mechanic is about to apply healing. | yes |
| MythicSkillEvent | Fired before a Mythic skill executes its mechanic queue. | yes |
| MythicTriggerEvent | Fired before Mythic executes trigger mechanics for a parent skill. | |
| MythicTargetEvent | Fired after a Mythic targeter is resolved but before the fallback is checked. | |
| MythicProjectileHitEvent | Fired when a Mythic projectile tracker intersects an entity target. | |
| MythicPlayerAttackEvent | Represents a player attack context in Mythic's Bukkit event layer. | |
### Auras, Stats & Items
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicAuraStartEvent | Called when an Aura is about to be applied to an entity or location Cancelling this event will prevent the aura from being applied | yes |
| MythicAuraStopEvent | Called when an Aura is stopped/terminated | |
| MythicStatChangeEvent | Fired when a tracked stat value changes for a caster. | |
| MythicApplyEnchantEvent | Fired before Mythic applies one enchantment to an item. | |
| MythicModifiedInventoryEvent | Fired after Mythic mutates a Bukkit player's inventory. | |
### Cinematics
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicCinematicStartEvent | Fired before a cinematic camera path begins playing for a player. | yes |
| MythicCinematicEndEvent | Fired when a cinematic camera path ends for a player (natural finish, manual cancel, player quit, or player death). | |
### Players & Variables
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicPlayerLoadedEvent | Fired after a PlayerData profile is initialized for an online player. | |
| MythicPlayerQuitEvent | Fired when Mythic unloads a player's profile during quit handling. | |
| MythicPlayerSignalEvent | Fired when the signal mechanic targets a player profile. | |
| MythicPlayerVariableSetEvent | Fired before a player variable entry is written. | |
| MythicPlayerVariableRemoveEvent | Describes removal of a player variable entry. | |
### Packets (advanced)
| Event | Description | Cancellable |
|-------|-------------|:-----------:|
| MythicPacketItemDataEvent | Fired for outbound item stack packets intercepted by volatile packet handlers. | |
| PlayerActionPacketEvent | Fired for inbound player action packets intercepted by volatile packet handlers. | yes |