Wiki 9Minecraft Wiki 9Minecraft

Custom NPCs Mechanics and Scripting

Guides 3FAQ 10Items 11Blocks 9Mobs 10Related mods 48
DownloadCustom NPCs Mod

Get the files on 9Minecraft

Contents (4)
  1. Scripting API
  2. Commands
  3. Next guides
  4. More in this wiki

Scripting API

For advanced users, the mod includes a powerful scripting API. Scripts can be attached to NPCs, Items, Blocks, or the Forge event bus.

  • Languages: JavaScript (via Nashorn/GraalVM) is the default. Other languages like Python or Lua can be added via external libraries
  • Hooks: Common hooks include init (when spawned), tick (every 10 ticks), interact (when clicked), damaged, and died

Commands

Commands are prefixed with /npc or /noppes. * /npc create [name] - Spawns a new NPC. * /npc home - Sets the NPC's home position to your current location. * /noppes config - Opens the mod configuration menu. * /noppes clone spawn [name] [tab] - Spawns a saved clone at your location. * /noppes quest finish [player] [id] - Force-completes a quest for a player.