Citizens API NPC Spawning

Discussion in 'Plugin Development' started by Greyson, Dec 10, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Does anyone know the code to spawn an NPC with the Citizens API??? Thanks for the help ^_^
  2. Offline


    Wouldn't you just spawn it just like any other mob, but select NPC as the mob type?
  3. Offline


    No you can't do that :/ Only Villagers
  4. You can't spawn NPCs via the API, but via Citizens itself.

    1. import net.citizensnpcs.resources.npclib.NPCManager;
    2. import net.citizensnpcs.api.event.NPCCreateEvent.NPCCreateReason;
    4. public void spawnNPC() {
    5. NPCManager.register(<name of the NPC>, <the NPC location>, <name of the player who owns the NPC>, NPCCreateReason reason) ; // for the last one, check the API which reasons are available.
    6. }
Thread Status:
Not open for further replies.

Share This Page