Skip to main content
NMEntities ships a public addon API: third-party plugins can extend it the way addon ecosystems grow around the big plugins. New effect mechanics, new targeters, custom right-click behavior for NPCs, programmatic spawning: 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:
The entry point is:

What the API exposes

Custom mechanics and targeters. Add new words to the effect language, usable in any mob, NPC or effect config exactly like built-ins. This is the headline feature: see Custom Mechanics & Targeters. 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 programmatically. 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. Events. Bukkit events for mob spawns, NPC interactions and reloads: see 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.