Creating Custom NPCs in Minecraft with Citizens2
"Citizens - the premier plugin and API for creating server-side NPCs in Minecraft."
CitizensDev/Citizens2 · github.com
Running a Minecraft server that feels empty? Citizens2 is the plugin that fixes that. It's been the standard way to add realistic NPCs to Bukkit servers since 2011, and it's still the best option if you want actual player-like characters populating your world instead of generic mobs or floating holograms.
What Citizens2 Is
Citizens2 is a Bukkit plugin that lets you spawn and control NPCs (non-player characters) on your server. These are full, real-looking players that can walk around, hold items, and interact with your world. Unlike armor stands or temporary holograms, Citizens2 NPCs persist, have proper skins, and genuinely look like players walked into your server.
The plugin provides an API so developers can build on top of it.
What makes it actually useful is that the hard stuff is already solved. Player packet rendering, skin loading, pathfinding through terrain, collision detection - Citizens2 handles all of it. You just tell it to spawn an NPC and what it should do. Most servers use it for quest-givers, merchants, guards, or just populating towns to make the world feel lived-in. Some developers build entire quest systems and custom AI on top of the API, but basic usage is straightforward.
Why This Matters for Your Server
The difference between a server that feels empty and one that feels like a real world is often just NPCs. Sprinkle a few quest-givers around, have village guards patrolling, or stick a merchant in the town square and suddenly the place doesn't feel abandoned.
Survival servers especially benefit from NPCs. Instead of item frames for shops, you've got actual vendors. Instead of command blocks triggering events, you've got NPCs telling a story. The immersion difference is huge.
For plugin developers, Citizens2's API means you're not building NPC handling from scratch. Event listeners, custom behaviors, and NPC control are already there. You just extend it for your specific use case.
- Economy servers - Create realistic shopkeepers instead of command-block workarounds.
- Story-driven worlds - NPCs can trigger dialogue, quests, and narrative sequences.
- Towns and cities - Guards patrol, merchants sell, quest-givers hand out tasks.
- Custom plugins - Developers build specialized systems on top of the Citizens API.
Getting Citizens2 Running
Installation is straightforward. Citizens2 runs on any Bukkit-compatible server like Spigot or Paper. Download the latest build and drop the JAR into your plugins folder:
cd ~/server/plugins
wget https://ci.citizensnpcs.co/job/Citizens2/lastSuccessfulBuild/artifact/target/Citizens-*.jar
# Restart your serverOnce the server restarts, the plugin loads automatically. You'll immediately have access to NPC commands. Creating your first NPC takes one line:
/npc create TestNPC
/npc skin TestNPCThat spawns an NPC at your location with a player skin. The second command assigns it a specific skin (defaults to Steve if you don't specify a name). From there, you can customize appearance, assign waypoints for patrolling, or hand it over to plugin developers for custom behavior.
Before installing Citizens2, make sure your server configuration is solid. Use the Server Properties Generator to optimize your server.properties file - proper settings reduce lag when you add plugins like Citizens2.
The Features That Make It Worth Using
Realistic Player Appearance. Citizens2 NPCs render as actual players with arms, hands, head movement, and proper hitboxes. They wear armor, hold items, and move through terrain like a real player would. New players joining your server actually see characters, not mobs.
Pathfinding Without Code. Built-in pathfinding means NPCs navigate terrain automatically. Set a few waypoints and the NPC walks the route, avoiding obstacles and jumping up blocks. No pathfinding algorithms required on your end.
Texture packs work too. If your server runs a custom texture pack, NPCs render correctly for all players.
Command-Based Customization. You don't need to code anything for basic NPC management. Commands handle spawning, equipment, names, and simple behaviors. Admins can set up NPCs through pure command-line interface without touching Java.
Developer-Friendly API. For plugin developers, the Citizens API exposes events, behavior control, and NPC manipulation. Want to trigger actions when players click NPCs? Want to build a dialogue system? Want to add custom AI? The API gives you the hooks to do it. Documentation is available through the project's Javadoc, and the community has written tutorials for common extensions.
If you're managing whitelist systems across multiple servers, the Minecraft Whitelist Creator tool helps keep player lists synchronized - handy when NPCs interact with your actual players.
Gotchas and Things That Trip People Up
Citizens2 is stable, but there are quirks worth knowing before you rely on it heavily.
Version compatibility is strict. The plugin tracks Minecraft versions reasonably well, but running Citizens2 on a version it wasn't built for causes failures. NPCs might not spawn, skins might break, or the plugin might crash silently. Before installing, verify on the project wiki that your Minecraft version is supported. Actually check this - it matters.
NPC data persists in config files. If you're migrating servers, copy the entire plugins/Citizens folder or you'll lose all your NPCs. It's easy to forget and regret it later.
Performance scales poorly with huge numbers of NPCs. A dozen NPCs is fine. A hundred is probably okay. Five hundred on a small server will cause noticeable lag. There's no hard threshold - it depends on your hardware and what the NPCs are doing - but don't treat this as unlimited.
Skin loading requires internet access initially. The server fetches skins from Mojang's servers on first load. Running in isolated networks means skins default to the Steve texture. If you're behind a corporate firewall or running entirely offline, this can be annoying.
Similar Projects and Alternatives
Citizens2 has been around for over a decade and remains the most mature option for Bukkit servers wanting real NPCs. Other plugins exist, but they usually solve specific problems rather than being general-purpose NPC frameworks.
Some developers use lightweight alternatives like Citizens2 competitors that handle only holograms, or they build custom NPC systems using Minecraft's internals directly. But if you want a proven, stable, widely-supported NPC system, Citizens2 is the standard choice. The community is active, documentation is solid, and the API is battle-tested.
For servers not running Bukkit (vanilla multiplayer or Fabric-based servers), Citizens2 won't work. You'd need datapacks, mods, or custom solutions entirely - a different complexity level altogether.


