CommandNPC
![](http://i.imgur.com/nGk5BbZ.png)
CommandNPC is a plugin inspired by the server Mineplex, which adds a new function to NPCs. It allows users to run commands by simply right clicking on a Citizens NPC. Requires Citizens 2! Now requires Java 8
Commands and Permissions
(Now supports PlaceholderAPI)
To set up the npc with the commands you need the permission 'commandnpc.admin'
Be aware that flags that require additional input like [--v price], you need 2 dashes(-)!
-
/npc cmdadd [-c console] [-o Op] [-r random] [-i ignorePermMsg] [-l ignoreMoneyMsg] [--v price] [--t clickType] [--d delay] [--cd cooldown] [--p custom.permission.node] <command...> - Add a command to be executed upon clicking the selected NPC.
-
The -c flag runs the command through the console.
-
The -o flag runs the command as an op.
- The -r flag picks a random command and executes that one command only.
- The -i flag when true, noPerm message doesn't send
- The -l flag when true, noMoney message doesn't send
- The --v flag charges the player the specified amount, when running the command. (Numeric with decimal)
-
The --p flag requires the player to have the specified permission.
- The --d flag is the amount of ticks that the command will be delayed by. (Integer input)
- The --cd flag is a cooldown for the command in ticks. (20 ticks in a second)
- The --t flag sets the clickType('left', 'right', or 'both') | This will default to the global setting in config.yml
-
-
/npc cmdinfo [id] - Gets various information about all the NPC commands
-
If you include the command 'id' it will only show information for that command.
- You get the 'id' from using the 'cmdinfo' command
-
-
/npc cmdremove <id> - Removes a specific command
- You get the 'id' from using the 'cmdinfo' command
-
/npc cmdset <id> [-c console] [-o Op] [-r random] [-m cdMsg] [-i ignorePermMsg] [-l ignoreMoneyMsg] [--v price] [--t clickType] [--d delay] [--cd cooldown] [--p custom.permission.node] [command | cdMsg...] - Set various variables for the command
-
The -c flag runs the command through the console. (This will toggle between true/false)
- The -o flag runs the command as an op. (This will toggle between true/false)
- The -r flag picks a random command and executes that one command only.
- The -m flag is when you have a cooldown amount specified. When the player is in a cooldown and attempt to use the NPC, it will send them this message. (Usage: /npc cmdset -m [cdMsg...]) Note: When using other flags the cdMsg as to be the last things within the command.
- The -i flag when true, noPerm message doesn't send
- The -l flag when true, noMoney message doesn't send
- The --v flag charges the player the specified amount, when running the command. (Numeric with decimal)
- The --p flag requires the player to have the specified permission.
- The --d flag is the amount of ticks that the command will be delayed by. (Integer input)
- The --cd flag is a cooldown for the command in ticks. (20 ticks in a second)
- The --t flag sets the clickType ('left', 'right', or 'both')
- You get the 'id' from using the 'cmdinfo' command
-
-
/npc cmdreset - Remove all commands from the selected NPC.
-
You can use '%name' in commands as a placeholder for the user who is clicking the NPC.
- This plugin now supports a BungeeCord command. You may now use 'server <serverName>' to teleport people between servers!
How to setup the NPC
-
Edit config.yml to your likings
-
Select the NPC you wish to add commands too.
-
Use the command 'cmdadd' (Syntax listed above) to add the commands you wish.
-
These commands will be saved.
-
If you wish to remove the commands simply use the 'resetcmds' command. (Syntax listed above)
Metrics by bStats
Github
===== Donations =====
If you like what you see and want to support the development of this plugin and any other plugins I decide to create, you can donate to the developers! Just check the upper right of the page.
Can you please make it so i can choose what commands can be run by non op players. I would like players to be able to click them to run some commands they can't normally run. Great plugin otherwise keep up the great work!
Can you at least fix this problem?
@PCM_Tazmaik
I'm just saying that when you have 1 k downloads, so I have time to update it, it's not that I need 1 k downloads-
Yes, please post a awesome update! And in this update could you fix this problem I have!
Whenever I reload my server all the commands on the NPC's get erased!!!
Please fix!
Thanks!
@MisterAJC
If you want to have more than 1k download, post an update ! Because if you don't have donwload, it's because the plugin is not complete for the downloaders !
This is not with blackmail you'll get more download but by providing good updates!
@xDarkLotus
I don't understand you, I just said that if it comes down to 1 k of downloads I will post an improved version of the plugin!
how to tp people to coordintes, how to determinate the name in command and whats it about the console? i'm not sure /warp x works...
Dude if you post a message free version people will download even more not by asking for download's real bukkit plugin dev's don't do shit like that!
I'm back, when you get to 1 k downloads, post dispatch message, with cooldown from click and more!
How can i remove the message: "Dispatching Command..."?
@_Massacre
I agree.
Hey I made a video to set this up! I really want to make the bukkit page. Please add it or watch and give it a try! heres the link https://www.youtube.com/watch?v=_SBB9DmagBs&feature=gp-n-y
Love the Plugin guys! Thanks!
Please add the option to remove the Dispatching command... message
@CamSFGiant
Hey thank you! It works i alrady tried to use that in another way but this finally works! Much Thanks!
@DavidStyler10 It does work I use this same plugin with this.
/npc setcmd false chc open menu.yml
I don't know if it was already reported but when i set a command to an NPC ingame, the command work, but when I restart my server, when I click in the NPC, it's doesn't work ..
I think the file that contains the command does not save well.
@DavidStyler10
Use the real command of the plugin (In the command wiki)
Hi i have a german Server and i wanted to open some GUIĀ“s from ChestCommandsGUI with your Plugin. But it doesnt work. Maybe you use an Alias to run the Commands and it runs an error. Please fix it! Nice Plugin! (Sory for my bad english!)
Hi I'm a high school student living in South Korea.
Can I change this plugin output message?
I'm really need this feature
Thank you :D