Last updated
Last updated
Citizens2 is an advanced NPC plugin for Spigot that allows developers to extend basic NPCs to provide varied gameplay and functionality.
Download the plugin or (The premium version posted as a premium resource to motivate the continued development. Citizens can be used for free though.).
Upload the jar(s) to your /plugins
folder.
Restart the server.
If you need help installing plugins, check .
:::note You may also want to look at installing the Denzien, Sentinel, and dtlTraders plugins for Citizens.
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.
:::
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:
Rather than go over basic commands, listed below are several examples on how to use Citizens. For details on the commands, see the documentation.
:::note These examples are assuming you have instaled Citizens as well as Denzien, Sentinel, and dtlTraders plugins. :::
In this example, we will create a basic human NPC who says "Hello!":
Create the NPC: /npc2 create Bob
(Note... the NPC skin will be set based on the name. You can change this later. )
Make the NPC look at you: /npc2 look
Change the skin /npc2 skin --url https://www.minecraftskins.com/uploads/skins/2020/12/06/farmer-alex-15963302.png?v292
Open the Text editor: /npc2 text
Type add
to add text.
Type Hello!
to make the NPC say "Hello".
Type close
to make the NPC only talk when you are close to them.
Type delay 10
to make the NPC wait 10 seconds between each text.
Type /npc2 text
to exit the text editor.
:::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... :::
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. ) 1. Make the NPC look at you: /npc2 look
To switch to a different NPC, do the following: 1. Make sure your cross-hairs are pointed to the NPC you want. 1. Type /npc2 select
to choose that NPC.
To rename an NPC, do the following: 1. Make sure you have the NPC selected (see above) 1. Type /npc2 rename [name]
(For example, to rename Bob above to Jill, type /npc2 rename Jill
).
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
)
In this example, we will create a basic shop
Put the item or items you want to sell in your inventory. For this example, put a single stone block.
Type /dtltraders trait
. This will open up a creation GUI
Select Create trader NPC
Choose the Yes
block
Name the NPC
Select Create Shop
Name the Shop
Select Edit Shop Pages
Select the default page (usually something like Page 71122
). You can in the next screen by choosing Change title
.
Select Change Contents
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).
Drag the stone block into the box above, then click Exit
.
Click on Change content functions
Click on the stone block
Click on Change trade price
and type in a price (e.g. 50).
Click Save and go back
Click on Exit
Click Save and go back
until you are completely out of the GUI.
Click on your new NPC and you should be able to buy stone blocks for 50 gold.
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.
:::
Check the docs for details. Asking nicely on Bloom's discord and/or other Minecraft related discord servers may also work.
Citizens - /plugins/Citizens/config.yml
-
Sentinel - /plugins/Denizen/config.yml
-
dtlTraders - /plugins/dtlTraders/config.yml
-
dtlTradersPlus (Premium Version) - /plugins/dtlTradersPlus/config.yml
-
:::note For NPC skins, you can go to 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"
:::
How do I find you when I cannot solve this problem