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 Mar 26, 2014Hello guys,
Help me pls, it doesn't work when i do this cmd: /npc setcmd true/false menu open 1 Im using createyourownmenu and this cmd doesn't work.
Very good plugin and help me pls
-
View User Profile
-
Send Message
Posted Mar 22, 2014Does this plugin not make you run aliases or commands made via another plugin? I am using Compass Navigation for shops, and would like players to be able to open the shop by right-clicking on a villager, but whenever you right-click on it, it says "Unknown command". However, I can use the command fine.
-
View User Profile
-
Send Message
Posted Mar 22, 2014This is a genius Plugin! I love it! Thanx for the great Plugin! ;)
-
View User Profile
-
Send Message
Posted Mar 22, 2014Guys, you are asking for things very professional and don't have time for this, I want to focus more on programs that help me with money; (if anyone can help by donating, paypal: mpjcormanich@hotmail.com)
-
View User Profile
-
Send Message
Posted Mar 20, 2014WARNING! DUMB QUESTION ALERT!!! Sorry for the dumb question, but this doesn't hook up with citizens does it? Thanks.
-
View User Profile
-
Send Message
Posted Mar 20, 2014Oh, and very important would also be a command to change the command of the npc for a specific player. Thanks!!
-
View User Profile
-
Send Message
Posted Mar 20, 2014I think all i need now is...
Command to change name of NPC for a specific player!
Thank you.
-
View User Profile
-
Send Message
Posted Mar 19, 2014@MerijnRaaij
umm, is there a 1.6.4? please tell me. and also send da link if possible and ya
@MisterAJC
umm, is there a 1.6.4? please tell me. and also send da link if possible and ya
-
View User Profile
-
Send Message
Posted Mar 19, 2014@MerijnRaaij
But the new update has only bug fixes? It says that when i click on it.
But, what i would like to see, is:
1) Command to change name of NPC for a specific player. 2) Multiple commands.
-
View User Profile
-
Send Message
Posted Mar 18, 2014@MisterAJC
Ow nice, New update. Going to make a new video soon :3
-
View User Profile
-
Send Message
Posted Mar 17, 2014@Krisahstar
That doesn't work either :/ I don't understand why not. ServerSigns (basically a plugin that lets you execute commands when you click a sign) does it flawlessly.
I would rather have NPCs to click on though ;)
-
View User Profile
-
Send Message
Posted Mar 16, 2014@Boaike
It's because the commands are triggered by the console, not the player. Use npc setcmd false buy.
-
View User Profile
-
Send Message
Posted Mar 16, 2014For some reason the plugin doesn't want to execute (buycrafts) /buy command. It works fine with every other command I've tried so far. Any idea why?
-
View User Profile
-
Send Message
Posted Mar 15, 2014@MisterAJC
Alright.
One thing I also need: Can you add a command that can change the name of a NPC for a specific player? Like at first the name is "Buy Gold" and after he buys it via a menu then i want to do the command to change the name into like "Bought!" or such.
-
View User Profile
-
Send Message
Posted Mar 15, 2014Guys, my plugin is compatible with the Chestcommands! You want a video teaching?
-
View User Profile
-
Send Message
Posted Mar 15, 2014@Krisahstar
Try use it: %name
-
View User Profile
-
Send Message
Posted Mar 15, 2014And also an ability to use %player% to get the name of the player who clicks the npc.
-
View User Profile
-
Send Message
Posted Mar 14, 2014Add a possibility to initiate multiple commands from either the player's perspective, super-player's perspective or from console when clicking a certain npc. Then this plugin would ROCK!
-
View User Profile
-
Send Message
Posted Mar 13, 2014Ya know what? I like this plugin too much. Want a logo, good sir? I made a quick (basic :P) one if ya want! :D
It does appear to go off the page, but if you save it off to your desktop or drag it there, you'll get the whole thing! :)
-
View User Profile
-
Send Message
Posted Mar 13, 2014This plugin is AWESOME (besides the "Dispatching Command..." part).
If you want the exact same thing as MinePlex, with the menus, you can download this majestic plugin:
http://dev.bukkit.org/bukkit-plugins/chest-commands/
And then, create any game-joining menu you want, and then type this handy-dandy command onto the NPC.
/npc setcmd false chc open {menu_name.yml}
Then, when you click on your NPC, it will open the menu for the player! Btw, thx for this plugin SOOOO much. Can't wait for v1.2!