CommandNPC
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.
-
View User Profile
-
Send Message
Posted Feb 1, 2014@CamSFGiant
Yep.
-
View User Profile
-
Send Message
Posted Jan 31, 2014@manky944
you're typing ? /npc setcmd false menu
-
View User Profile
-
Send Message
Posted Jan 31, 2014With the Chest Command plugin, when I add a command to an NPC (menu not /menu) it always comes up with 'Unknown Command', although I can do it in game by just typing /menu. It may be because it is an aliased command (You can change the name of the command) and not a set one to that plugin.
I just tried it with the Essentials customtext feature and it worked.
-
View User Profile
-
Send Message
Posted Jan 29, 2014Adding Multiple commands would be awesome, also is it possible to have the NPCs silent.. for instance Villagers never shutup.
-
View User Profile
-
Send Message
Posted Jan 29, 2014@Revdutchie
"/npc setcmd <in console(true/false)> <command> " XD
-
View User Profile
-
Send Message
Posted Jan 28, 2014Warning TO ALL
DO NOT USE NEW DEV BUILD GLOBALMARKET with commandNPC.
It cause a stack trace and OP anyone that right clicks a npc that you had made run the /market listings command
Even if you have op in game turned off, your players will still get op.
Its not either devs fault, its just a serious serious serious bug.
http://pastebin.com/5M2WF0s8
-
View User Profile
-
Send Message
Posted Jan 27, 2014This plugin has some potential, but am I right that it can only run console commands and not player commands ?
-
View User Profile
-
Send Message
Posted Jan 27, 2014@SwagBurgerGamez
This is not meant to be mineplex based.. Somebody requested this plugin be made on the forums and the dev put it here
-
View User Profile
-
Send Message
Posted Jan 25, 2014Can you make more mineplex based plugins?
-
View User Profile
-
Send Message
Posted Jan 23, 2014Hey, could you make it so we can turn on/off the "Dispatching command..." message?
-
View User Profile
-
Send Message
Posted Jan 22, 2014@DerekZil
Yes, would be perfect! And a bungeecord hook ;)
-
View User Profile
-
Send Message
Posted Jan 21, 2014@DerekZil
Give Me your skype ...
-
View User Profile
-
Send Message
Posted Jan 21, 2014Also, make it so we can do multiple commands at once too.
This will make this plugin scary good!
Example:
-
View User Profile
-
Send Message
Posted Jan 21, 2014@MisterAJC
I have used that, as I mentioned below, doesn't work, thanks for replying tough, but I would love it if you will implement a hook for BungeeCord, :D
-
View User Profile
-
Send Message
Posted Jan 20, 2014@MisterAJC
I mean please make it so it can find their name. (One who clicked it.)
Do like: /npc cmdset true gamemode creative {Name}
-
View User Profile
-
Send Message
Posted Jan 20, 2014Tutorial Is online http://youtu.be/dVN8oEX1aHU if you need some help let it me know
-
View User Profile
-
Send Message
Posted Jan 20, 2014@Dumfoundead127
There is a download for the plugin but it is fairly new!
-
View User Profile
-
Send Message
Posted Jan 20, 2014@MisterAJC
Not trying to rush you (I'm just asking), but when do you think that might be released? P.S. Great plugin! :D
-
View User Profile
-
Send Message
Posted Jan 20, 2014@Hemebru
As I mentioned below, I'll be putting this in the next version of the plugin!
-
View User Profile
-
Send Message
Posted Jan 20, 2014@Hemebru
Try using this command: /npc setcmd false server hub