Commands & Configuration
Reference ModelEngineNPC commands, permissions, placeholders, configuration, and storage.
Commands
All commands use /menpc or /megnpc.
Core Management
| Command | Purpose |
|---|---|
| `/menpc create <id> <type> <model | url>` |
/menpc remove <id> | Delete an NPC |
/menpc copy <source-id> <new-id> | Clone an NPC to your location |
/menpc setnpctype <id> normal | Convert NPC to normal player entity |
/menpc setnpctype <id> model <model-id> | Convert NPC to model entity |
| `/menpc setskin <id> <player-name | url>` |
/menpc list | List all NPCs |
/menpc teleport <id> | Teleport to an NPC |
/menpc setmodel <id> <model> | Change NPC model |
/menpc setname <id> <name> | Set display name |
| `/menpc name <id> <true | false>` |
/menpc rotate <id> <yaw> [pitch] | Rotate NPC orientation |
/menpc lookclose <id> [radius] | Toggle look at player |
/menpc animation <id> <state> <anim> | Set animations |
/menpc play <id> <anim> [loop] [speed] | Play animation manually |
/menpc editor | Open GUI editor |
/menpc reload | Reload configuration |
Command Arguments
<value> is required. [value] is optional. NPC IDs identify saved NPC definitions. model requires a ModelEngine model ID; normal accepts player-style skin input.
Hologram Commands
Requires optional FancyHolograms.
/menpc hologram <id> enable|disable/menpc hologram <id> text <text>/menpc hologram <id> addline <text>/menpc hologram <id> removeline <index>
Interaction Commands
/menpc interaction <id> <left|right|both> add <prefix> <command>/menpc interaction <id> <left|right|both> set <prefix> <command>/menpc interaction <id> <left|right|both> clear
Permissions
By default, all permissions require op.
| Permission Node | Description |
|---|---|
modelenginenpc.* | Grants all permissions |
modelenginenpc.admin | Access to admin and reload commands |
modelenginenpc.command | Base NPC command access, excluding console interactions |
modelenginenpc.command.create | /menpc create |
modelenginenpc.command.remove | /menpc remove |
modelenginenpc.command.copy | /menpc copy |
modelenginenpc.command.interaction | Safe interaction actions |
modelenginenpc.command.interaction.console | Assign [console] actions |
Placeholders
| Placeholder | Replaced with | Security note |
|---|---|---|
{player} | Interacting player name | Identity-safe |
{player_uuid} | Interacting player UUID | Preferred for console target |
{npc_id} | Internal NPC identifier | Static |
Prefer {player} or {player_uuid} in console actions. Avoid dynamic user text inside command paths without validation.
Configuration
Edit plugins/ModelEngineNPC/config.yml only while the server is stopped.
settings:
debug: false
default-interaction-cooldown: 1000
save-interval: 300
despawn-on-chunk-unload: true
defaults:
animation:
idle: "idle"
interact: "interact"
loop-idle: true
speed: 1.0
interaction:
left-click-enabled: true
right-click-enabled: true
cancel-damage: trueDefaults and Validation
debugdefaults tofalse.default-interaction-cooldowndefaults to1000milliseconds.save-intervaldefaults to300seconds;0disables auto-save.despawn-on-chunk-unloaddefaults totrue.- Idle animation defaults to
idle; interaction animation defaults tointeract. speeddefaults to1.0; click handling is enabled by default.
Use valid numeric values and animation names available in the referenced ModelEngine model. Verify behavior in console after changes.
Restart and Reload Behavior
Stop the server before editing configuration or storage. Start it cleanly after changes. Do not use /reload, Plugman, or partial plugin reloads; packet listeners and entities can remain in a broken state.
Storage Reference
ModelEngineNPC stores active NPCs in plugins/ModelEngineNPC/npcs.yml.
npcs:
guard:
type: model
model-id: my_guard_model
location:
world: world
x: 100.5
y: 64.0
z: -200.5
yaw: 90.0
pitch: 0.0Do not edit npcs.yml while server is running. Stop server, apply changes, and restart. If file is corrupted, restore recent backup before starting server.
Developer API Notice
The public API source is retained in the migration archive and is not a standalone public documentation route. Integrators must verify ModelEngineNPCAPI signatures against the final v2.0.1 artifact. Check plugin presence before referencing classes:
softdepend: [ModelEngineNPC]