Plugin support
Citizens
With Citizens installed, an NPC can wear one of your
models and keep it through a chunk unloading, a respawn,
/npc reload and a server restart.
Look at the NPC and run:
/rp bind mypack:shopkeeperThere is no trait to add by hand and nothing to configure. /rp unbind, looking
at the NPC, takes the model off for good.
Player-shaped NPCs need the .others node
Most Citizens NPCs are player entities, so binding one counts as putting a
model on another player and needs rpengine.bind.others (and
rpengine.unbind.others to take it off) as well as rpengine.bind. Ops have
both. See Permissions.
What the NPC keeps#
Everything: its skin, name, pathing, commands, traits and identity. RP Engine
hides the normal body and shows the model instead; take the model off and the
NPC is exactly what it was. Binding adds an rpmodel trait to the NPC, which
Citizens saves, and that is how the model comes back after every respawn.
Animating one#
From your own plugin, through the API:
models.animate(npc.getEntity(), "wave");Citizens has no skill system to trigger animations from, so deciding when an NPC waves is up to your plugin.