Gamehost

Citizens: how to make NPCs on a Minecraft server

Make NPCs with the Citizens plugin: create a character, set its skin, run a command on click, make it look at players and combine it with other plugins.

Gamehost team·4 min read·Updated:
Minecraft serverPlans from 2 GB RAM

Server ready a moment after payment. You can change the plan in the panel at any time, your world stays.

An NPC that takes players to the arena or opens a shop when clicked is standard in a lobby. Citizens is the oldest and best supported plugin for this, and you can learn the basics in five minutes.

Installation

Citizens runs on Paper, Purpur and Spigot. The authors sell it on SpigotMC, but they also offer free builds on their build server (CI). Make sure you download the version that matches your server version: Citizens depends heavily on the game's internals, and an old version stops working after a server update.

  1. Upload the Citizens file to the plugins folder through Files, or install it from Plugins if it shows up in the search.
  2. Restart the server.
  3. Check /citizens in the console.

Your first NPC

# create an NPC where you stand
/npc create Guide
# the NPC turns its head to follow players
/npc lookclose
# skin of the premium account with that name
/npc skin Notch
# skin from a link to a PNG file
/npc skin --url https://example.com/skin.png

Commands apply to the selected NPC. A newly created one is selected automatically. To pick another, look at it and type /npc select.

CommandWhat it does
/npc tpheremoves the NPC to you
/npc rename <name>changes the name above its head
/npc type <entity>turns the NPC into another mob, for example villager
/npc equipmode for putting armor and items on the NPC
/npc removeremoves the selected NPC
/npc listlists all NPCs

A command on click

The most common task: clicking the NPC should run a command.

# the player who clicks the NPC runs /warp arena
/npc command add -p warp arena
# a console command, <p> is the name of the player who clicked
/npc command add give <p> bread 5
# right click only
/npc command add -r -p spawn
  • -p: the command is run by the player, with their permissions. Without the flag the console runs it, so be careful with commands that give items.
  • -l and -r: left click only or right click only.
  • /npc command without arguments lists the commands assigned to the NPC.
A skin given by name is downloaded from premium accounts. This also works if your server runs with online-mode=false (players without a paid Minecraft account), but the name has to belong to an existing premium account. If you set player skins with a plugin, see the SkinsRestorer guide.

Combining with other plugins

Citizens is the base that other plugins build on:

  • Quests, BetonQuest: NPCs that hand out quests.
  • Sentinel: guard NPCs that fight.
  • Denizen: scripts, dialogues and complex behavior.
  • Shopkeepers: villager shops (also works on its own).

Holograms above NPCs are usually done with a separate plugin, for example DecentHolograms.

Alternatives

On Paper, lighter alternatives are FancyNpcs and ZNPCsPlus. They are enough if the NPC only has to stand there and run a command. If you plan quests or guards, stay with Citizens, because the most plugins work with it. Citizens does not run on modded servers; there you use mods such as Easy NPC.

The plugin installer and file manager come with every plan on our Minecraft server hosting.

FAQ

It is paid on SpigotMC, but the authors offer free builds on their build server. The version has to match your server version.

Select the NPC and type /npc skin premium_account_name, or /npc skin --url with a link to a PNG skin file.

Type /npc command add -p warp name. The -p flag makes the clicking player run the command.

Update Citizens to a version that matches the new server version. NPC data is stored in saves.yml in the plugin folder and comes back after the update.

No. It is a plugin for Paper, Purpur and Spigot. Modded servers need an NPC mod.

Your own Minecraft server

Plans from 3.79 € a month, set up in a few minutes and managed from one panel.

See plans