> For the complete documentation index, see [llms.txt](https://kermitcloud.gitbook.io/kermitcloud-hosting-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kermitcloud.gitbook.io/kermitcloud-hosting-wiki/minecraft-plugins/plugins/citizens-2.md).

# Citizens 2

### What does the plugin do?[​](https://docs.bloom.host/plugins/citizens2#what-does-the-plugin-do) <a href="#what-does-the-plugin-do" id="what-does-the-plugin-do"></a>

Citizens2 is an advanced NPC plugin for Spigot that allows developers to extend basic NPCs to provide varied gameplay and functionality.

### Installation[​](https://docs.bloom.host/plugins/citizens2#installation) <a href="#installation" id="installation"></a>

1. Download the plugin [directly from the developer](https://wiki.citizensnpcs.co/Versions) or [from the Premium spigot page](https://www.spigotmc.org/resources/citizens.13811/) (The premium version posted as a premium resource to motivate the continued development. Citizens can be used for free though.).
2. Upload the jar(s) to your `/plugins` folder.
3. Restart the server.

If you need help installing plugins, check [How to install plugins](https://docs.bloom.host/installing-plugins).

note

You may also want to look at installing the Denzien, Sentinel, and dtlTraders plugins for Citizens.

* [Denizen](https://docs.bloom.host/plugins/denizen) is an extension for Citizens that allows scripting of NPCs to handle tasks, quests, player interaction and more!
* Sentinel is an extension for Citizens that allows Combat NPCs who can protect players, towns, etc.
* dtlTraders is an extension for Citizens that allows NPCs as merchants who can buy, sell, and/or trade with players.

### Configuration[​](https://docs.bloom.host/plugins/citizens2#configuration) <a href="#configuration" id="configuration"></a>

Citizens (and the related plugins) can be tweaked via the config settings.

note

Generally, you can probably get started using Citizens (and the related plugins) without having to go a lot of configuration.

The config files are:

* Citizens - `/plugins/Citizens/config.yml` - [Docs](https://wiki.citizensnpcs.co/Configuration)
* Sentinel - `/plugins/Denizen/config.yml` - [Docs](https://github.com/mcmonkeyprojects/Sentinel/blob/master/README.md)
* dtlTraders - `/plugins/dtlTraders/config.yml` - [Docs](https://www.spigotmc.org/resources/dtltraders.35890/)
* dtlTradersPlus (Premium Version) - `/plugins/dtlTradersPlus/config.yml` - [Docs](https://www.spigotmc.org/resources/dtltradersplus.63690/)

### Commands[​](https://docs.bloom.host/plugins/citizens2#commands) <a href="#commands" id="commands"></a>

Rather than go over basic commands, listed below are several examples on how to use Citizens. For details on the commands, see the documentation.

#### Creating an NPC[​](https://docs.bloom.host/plugins/citizens2#creating-an-npc) <a href="#creating-an-npc" id="creating-an-npc"></a>

note

These examples are assuming you have instaled Citizens as well as Denzien, Sentinel, and dtlTraders plugins.

**Basic Human NPC**[**​**](https://docs.bloom.host/plugins/citizens2#basic-human-npc)

In this example, we will create a basic human NPC who says "Hello!":

1. Create the NPC: `/npc2 create Bob` (Note... the NPC skin will be set based on the name. You can change this later. )
2. Make the NPC look at you: `/npc2 look`
3. Change the skin `/npc2 skin --url https://www.minecraftskins.com/uploads/skins/2020/12/06/farmer-alex-15963302.png?v292`
4. Open the Text editor: `/npc2 text`
5. Type `add` to add text.
6. Type `Hello!` to make the NPC say "Hello".
7. Type `close` to make the NPC only talk when you are close to them.
8. Type `delay 10` to make the NPC wait 10 seconds between each text.
9. Type `/npc2 text` to exit the text editor.

note

For NPC skins, you can go to [Minecraft Skins](https://www.minecraftskins.com/) or a similar website. You will need a direct link to the NPC skin to apply it. For Minecraft Skins, you can click on the "Image Link"

note

You can add multiple lines by repeating the `add` command while in the text editor. You can also use placeholders if you have the plugin installed and enabled. For example `Hello %player_name%!` YMMV...

**Wolf NPC**[**​**](https://docs.bloom.host/plugins/citizens2#wolf-npc)

In this example, we will create a wolf NPC:

1. Create the NPC: `/npc2 create Rover --type wolf` (Note... the NPC skin will be set based on the name. You can change this later. )
2. Make the NPC look at you: `/npc2 look`

#### Selecting an NPC[​](https://docs.bloom.host/plugins/citizens2#selecting-an-npc) <a href="#selecting-an-npc" id="selecting-an-npc"></a>

To switch to a different NPC, do the following:

1. Make sure your cross-hairs are pointed to the NPC you want.
2. Type `/npc2 select` to choose that NPC.

#### Renaming an NPC[​](https://docs.bloom.host/plugins/citizens2#renaming-an-npc) <a href="#renaming-an-npc" id="renaming-an-npc"></a>

To rename an NPC, do the following:

1. Make sure you have the NPC selected (see above)
2. Type `/npc2 rename [name]` (For example, to rename Bob above to Jill, type `/npc2 rename Jill`).

#### Deleting or despawing[​](https://docs.bloom.host/plugins/citizens2#deleting-or-despawing) <a href="#deleting-or-despawing" id="deleting-or-despawing"></a>

* To delete an NPC, make sure you have the NPC selected and then type `/npc2 remove`. Note that there is no undo!
* To despawn an NPC without deleting them, make sure you have the NPC selected and then type `/npc2 despawn`. To repawn them, type `/npc2 spawn [name]` (e.g. `/npc2 spawn Jill`)

#### Creating a Shop NPC[​](https://docs.bloom.host/plugins/citizens2#creating-a-shop-npc) <a href="#creating-a-shop-npc" id="creating-a-shop-npc"></a>

In this example, we will create a basic shop

1. Put the item or items you want to sell in your inventory. For this example, put a single stone block.
2. Type `/dtltraders trait`. This will open up a creation GUI
3. Select `Create trader NPC`
4. Choose the `Yes` block
5. Name the NPC
6. Select `Create Shop`
7. Name the Shop
8. Select `Edit Shop Pages`
9. Select the default page (usually something like `Page 71122`). You can in the next screen by choosing `Change title`.
10. Select `Change Contents`
11. In the bottom right corner there is a stone block. This block lets you toggle between the Buy, Sell, and Trade functions. We will be using `Buy` to allow players to buy items (so don't change it). You can create shops for players to sell items to the trader or trade `X item` for `Y item` (for example in Skyblock, trade 10xRedstone for 1 dirt).
12. Drag the stone block into the box above, then click `Exit`.
13. Click on `Change content functions`
14. Click on the stone block
15. Click on `Change trade price` and type in a price (e.g. 50).
16. Click `Save and go back`
17. Click on `Exit`
18. Click `Save and go back` until you are completely out of the GUI.
19. Click on your new NPC and you should be able to buy stone blocks for 50 gold.

#### Managing shops[​](https://docs.bloom.host/plugins/citizens2#managing-shops) <a href="#managing-shops" id="managing-shops"></a>

* To edit existing shops, type `/dtltraders edit` and select the shop you want to edit.
* To delete a shop, type `/dtltraders delete [shopname]`

note

Notes:

* Sometimes it is easier to delete an item or shop and start over if things are behaving oddly.
* You can use the NPC commands above on shop NPCs (e.g. `/npc2 look`, `/npc2 skin`, etc.). You can also make non-human NPC shops (like a wolf that buys bones!)
* You may want to set a shop's permission to something players don't have while you are creating the shop (e.g. youdonhaveaccess.shop). The permission can be anything you want.
* You can set up shops to sell commands (e.g. an NPC that sells flight time!)
* You can enable or disable the buy, sell, and/or trade functions in the shop independently.
* You can set permissions on individual shop items
* You can limit the number of items a player can buy, sell, or trade to a shop.

### Additional Information[​](https://docs.bloom.host/plugins/citizens2#additional-information) <a href="#additional-information" id="additional-information"></a>

#### Downloads[​](https://docs.bloom.host/plugins/citizens2#downloads) <a href="#downloads" id="downloads"></a>

* [Spigot Page](https://www.spigotmc.org/resources/citizens.13811/)
* [Downloads](https://wiki.citizensnpcs.co/Versions)

#### Documentation[​](https://docs.bloom.host/plugins/citizens2#documentation) <a href="#documentation" id="documentation"></a>

* [Citizens Docs](https://wiki.citizensnpcs.co/Configuration)
* [Sentinel Docs](https://github.com/mcmonkeyprojects/Sentinel/blob/master/README.md)
* [dtlTraders Docs](https://www.spigotmc.org/resources/dtltraders.35890/)
* [dtlTradersPlus (Premium Version) Docs](https://www.spigotmc.org/resources/dtltradersplus.63690/) – Requires Spigot account!

#### Need Help[​](https://docs.bloom.host/plugins/citizens2#need-help) <a href="#need-help" id="need-help"></a>

Check the docs for details. Asking nicely on Bloom's discord and/or other Minecraft related discord servers may also work.
