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 Jun 6, 2016@heckabecca
Thanks... I had made it work for 1.9 however it apparently had broken when Citizens updated to v2.0.18.
I will remove the newest download.
-
View User Profile
-
Send Message
Posted Jun 5, 2016FIX!
CommandNPC v1.7.3 (For 1.8.8) works for 1.9.4!
Any of you having issues with the plugin, use this version.
-
View User Profile
-
Send Message
Posted Jun 4, 2016Doesn't work for 1.9.4 spigot
-
View User Profile
-
Send Message
Posted Jun 2, 2016rly no longer working 4 me (spigot 1.9.4, Citizens 2 from jenkins server)
-
View User Profile
-
Send Message
Posted Jun 1, 2016@MysticCity
Same, the npc's are no longer working.
Edit: What about this? http://prntscr.com/bbe4rx
-
View User Profile
-
Send Message
Posted May 31, 2016@razorrider7
Does the latest version support 1.8.8?
Also would we awesome to fix the Right Click issue.
Thanks so much for all hard work.
-
View User Profile
-
Send Message
Posted May 31, 2016@razorrider7
Errorlog: no errors in log
Error: If i klick an NPC no command work.
Infos: I`m OP so yes i have all perms.
Version: 1.8.0 with Spigot 1.9.4
-
View User Profile
-
Send Message
Posted May 31, 2016@QUIQUELHAPPY @noodlesDEV @mark22padre @Refornm @Clijmart
Updated to 1.9.4, however only 'Left' and 'Both' work in the config for ClickType.
-
View User Profile
-
Send Message
Posted May 29, 2016Update for 1.9.4? Please! Great plugin.
-
View User Profile
-
Send Message
Posted May 18, 2016Great plugin 10/10
-
View User Profile
-
Send Message
Posted May 10, 20161.9.4 update?
-
View User Profile
-
Send Message
Posted May 5, 2016Ok guys, so ive been having the problem as everyone else where only OPs can make the NPCs run commands.. Well I figured it out!
You must give everyone the permission ( commandnpc.admin ) then disable them from using the commands ( /npc addcmd ) and ( /npc resetcmds ). which enables them to use the NPC(s) as an OP but without being able to use the OP commands.
additionally you must make sure they have the permission to use the command that will be executed such as ( BossShop.open ) for the plugin 'BossShop' which allows the player to open all shops via sign/command.
Hope this helps everyone out, I know I was going crazy trying to find another plugin to do this but alas there is not. THIS IS NOT A FIX but it is a useful way around the error until messageofdeath can update/fix it. :)
-
View User Profile
-
Send Message
Posted May 3, 2016When I right click if I am not OP the command isn´t working. I have checked wolrdguard and spawnprotection. I am on 1.9.2. What should I do?
-
View User Profile
-
Send Message
Posted Apr 29, 2016Not sure if anyone can help me but i have a problem: Unless a player is op they cant use the command. Spawn protect is off Worldguard flags all allow interactions essentials protect is off
All of those things should mean that a player could use an npc but none of them can. Please help.
-
View User Profile
-
Send Message
Posted Apr 17, 2016Please add 1.9.2 support thanks :)
-
View User Profile
-
Send Message
Posted Mar 29, 2016Please update to 1.9 to fix the Double Command bug <3 Overall, nice plugin!
-
View User Profile
-
Send Message
Posted Mar 28, 2016@TheStormCreeper4190
It probably isn't this plugin, it's probably something else. Check out the region it's in, if you're using worldguard it could be that you need to enable a flag. It could also be Spawn Protection from server.properties.
Check those two things and good luck!
-
View User Profile
-
Send Message
Posted Mar 27, 2016Just wondering if there was a way to have two commands assigned to one npc? With one being for left click and one for right click.
-
View User Profile
-
Send Message
Posted Mar 26, 2016With the 1.9 release, it makes every command go off twice instead of once.
-
View User Profile
-
Send Message
Posted Mar 19, 2016Hi, Ive added a command to all my npc's and when im opped, i can use them but when im not it doesnt do anything. HELP PLS! IM POSTING MY SERVER SOON