Skip to main content

Adding an NPC with Citizens

This guide explains how to create and manage NPCs using the Citizens plugin, including appearance settings, interactions, and NPC management.


Prerequisites

Before starting, make sure:

  • The Citizens plugin has been installed and is compatible with the server version.
  • You have operator access or the citizens.* permission.

Plugin Installation

  1. Download the Citizens2 plugin from Jenkins,

  2. Choose a Citizens2 build version and match it to your server version,
    For example, Build #3757 for version 1.21.4,
    For other versions, you can try checking different Citizens builds, either old or new builds

  3. Place the .jar file into the plugins/ folder

  4. Restart the server to activate the plugin

Notes

  • If the plugin doesn't work or shows red on /pl, switch to another Citizens build until you find a compatible version.
  • A plugin that runs successfully will be marked green on /pl.
  • The older the server version like 1.19 or 1.20, the more you should try older Citizens builds

Creating an NPC

  1. Stand at the location where the NPC will appear
  2. Use the command:
/npc create <npc_name>

Example:

/npc create adminshop

The NPC will appear at the player's location with the specified name.


Changing the NPC's Appearance

  • Set the skin based on a player name:
/npc skin <player_name>

Example

/npc skin Violiddd
  • Change the entity type:
/npc type <entity_type>

Example

/npc type villager
  • Enable the NPC's feature to look at players:
/npc look

Adding Interactions

  • Add text when clicked:
/npc text

After typing the command, click the NPC and enter the message you want to display.

  • Add a command when clicked:
/npc cmdadd <command>

Example:

/npc cmdadd warp spawn

NPC Management

  • Select an NPC to edit:
    Determine the NPC you want to edit, then point your cursor at or face the NPC at close range, then
/npc select
  • Delete an NPC:
/npc remove
  • Move an NPC to a new location:
/npc tp
  • View the list of all NPCs:
/npc list

Additional Tips

  • Use /npc help to see all available subcommands.
  • NPC data is stored in plugins/Citizens/saves.yml and can be backed up or modified manually.
  • For advanced interactions like scripts or complex dialogues, consider integrating with the Denizen plugin.