NPC Commands: Difference between revisions
(Created page with "== NPC Click Commands == One of the common things Citizens users want is the ability to have NPCs run a command when right-clicked. While this isn't a native feature in Citiz...") |
No edit summary |
||
Line 1: | Line 1: | ||
== NPC Click Commands == | == NPC Click Commands == | ||
One of the common things Citizens users want is the ability to have NPCs run a command when right-clicked. | One of the common things Citizens users want is the ability to have NPCs run a command when right-clicked. | ||
There is a limited version of this newly available in Citizens via the "/npc command" command. For details, refer to "/npc help command". | |||
The old method, which in many cases is still the better method, is to use Denizen - information for that follows below. | |||
== Prerequisite == | == Prerequisite == |
Revision as of 18:03, 16 October 2019
NPC Click Commands
One of the common things Citizens users want is the ability to have NPCs run a command when right-clicked.
There is a limited version of this newly available in Citizens via the "/npc command" command. For details, refer to "/npc help command".
The old method, which in many cases is still the better method, is to use Denizen - information for that follows below.
Prerequisite
Denizen is a scripting engine that directly integrates Citizens to add more features and options to server owners. Learn about Denizen on Spigot here and download Denizen on the Citizens Jenkins build server here.
How To Make a Click Command
The standard way to get click-commands set up in Denizen is to write an assignment script with a click action or trigger. There's a video explaining how to do this here.
Easier Option
If you'd rather not bother with scripting yourself and instead would prefer to use an in-game command, you can use a premade script available here. Simply download the script linked in that forum post, save it into "plugins/Denizen/scripts" as a .yml or .dsc file, and then use "/ex reload" to load the script. At that point, you can select any NPC and use "/npccommand set [command]" (view the forum post linked previously for additional command usage information).
Additional Support
If confused, join the Citizens+Denizen shared Discord to ask for help!