Skip to main content
NMEntities fires Bukkit events that addons can listen to like any other. They live in org.nexomaker.api.event.

NMEntitiesMobSpawnEvent

Fires when a registered mob is spawned through the pipeline: /nme spawn, the Entities menu and its eggs, the summon mechanic, or the API. Cancellable: yes. Cancel it to block the spawn. Use it for region protection (no bosses in spawn), spawn limits, or logging.

NpcInteractEvent

Fires when a player right-clicks an NPC. Cancellable: yes. Cancelling suppresses the NPC’s configured right-click effects. This is the hook for building custom NPC behavior beyond what right-click effects cover: open a shop inventory, start a dialog tree, gate interactions behind quest progress. Listen, cancel, and run your own logic.

NMEntitiesReloadedEvent

Fires after /nme reload completes: models, mobs, NPCs and effects have all been re-read. Cancellable: no. Use it to refresh anything your addon derives from NMEntities’ registries, like cached mob lists or generated content.

Listening

Standard Bukkit listeners, nothing special:
Register the listener in your addon’s onEnable as usual. The developer guide (API.md, shipped with the plugin) covers each event’s getters and full examples.