> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nmentities.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Addon API

> Extend NMEntities with your own plugin: setup, the API surface, and where to go deeper.

NMEntities ships a **public addon API**: third-party plugins can extend it the way addon ecosystems grow around the big plugins. New effect mechanics, targeters, triggers, conditions and placeholders, custom right-click behavior for NPCs, programmatic spawning, even bundled mobs shipped entirely from code: if you can write a Bukkit plugin, you can extend NMEntities.

## Setting up an addon

An addon is a normal Bukkit plugin that:

1. **Compiles against the NMEntities jar** (add it as a provided/compileOnly dependency in your build).
2. **Declares the dependency** in its `plugin.yml`:

```yaml theme={null}
depend: [NMEntities]
```

The entry point is:

```java theme={null}
org.nexomaker.api.NMEntitiesAPI
```

## What the API exposes

**Extending the effect language.** Add new words to the effect DSL, in all five categories (mechanics, targeters, triggers, conditions, placeholders), usable in any mob, NPC or effect config exactly like built-ins. This is the headline feature: see [Extending the Effect Language](extending-effects).

**Mobs.** Look up mob definitions, spawn registered mobs through the full pipeline (model, stats, `#onSpawn` effects), check whether an entity is an NMEntities mob, and fire effect triggers (built-in or custom) by name. Addons can also **contribute bundled mob definitions from code** that survive `/nme reload`: ship a pack of ready-made mobs inside your addon without shipping a single YAML file.

**NPCs.** Look up NPC definitions, identify NPC entities in the world, and mutate them through the same operations the `/npc` commands use.

**Effects.** Parse effect lines and run named effects with any caster and target, the programmatic version of [`/nme effect start`](effect-start).

**Events.** Bukkit events for mob spawns, NPC interactions and reloads: see [Events](addon-events).

## The full developer guide

This section covers what the API can do. The complete developer guide, with compilable examples for every feature, ships as `API.md` with the plugin.
