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 Oct 22, 2017you ever figure it out I have this problem
-
View User Profile
-
Send Message
Posted Feb 18, 2017How do you delete a NCP?
-
View User Profile
-
Send Message
Posted Jan 8, 2017needs more features like cooldown time, price and a limit of how many times it can be used before a cooldown becomes active
-
View User Profile
-
Send Message
Posted Mar 4, 2017You can use a command cooldown plugin for that!
-
View User Profile
-
Send Message
Posted Apr 4, 2017In reply to TheDuskull:
-
View User Profile
-
Send Message
Posted Dec 22, 2016can you add cooldowns somehow? so people cant spam the command and crash servers?
-
View User Profile
-
Send Message
Posted Dec 21, 2016Hello! When I Put CommandNPC.jar in my plugins it dont want load. When i type /plugins there ist CommandNPC (i mean not there , no in red color) I think the server can't load CommandNPC.jar Using: Bukkit 1.11
-
View User Profile
-
Send Message
Posted Dec 18, 2016Okay so I need some help for allowing my players to be able to interact with the command NPC so they can right click it because it is not sending them the command, So I'm wondering if there is like a permission node or something? im not sure if I'm missing something and I'm completely stupid but I was just wondering if I could get some help?
-
View User Profile
-
Send Message
Posted Dec 20, 2016When you added the command to the NPC what did you set as permission node?
/npc addcmd <in console(true/false)> <customPerm/noPerm> <command>
for example:
if you changed <customPerm> too npc.servers , then you player will need npc.servers as permission node. If you don't want to have a custom permission node then set it to noPerm.
=> So if you want a NPC to perform /servers when a player right clicks on him with no extra permissions..
Then do:
- "/npc select" , to select you npc that needs to perform the command.
- "/npc addcmd false noPerm servers" , adds the command severs to the selcted NPC.
If you want it to be performed by the console (what I don't recomend) then instead of this:
- "/npc addcmd false noPerm servers" , adds the command severs to the selcted NPC.
Do this:
- "/npc addcmd true noPerm servers" , adds the command severs to the selcted NPC.
Greetings !
-
View User Profile
-
Send Message
Posted Dec 21, 2016Thank you so much! I didnt quite understand the plugin at first since my server is in early stages, but thanks again for helping me!
-
View User Profile
-
Send Message
Posted Dec 6, 2016There is a bug
when i added a cmds it execute the command twice?
-
View User Profile
-
Send Message
Posted Jan 21, 2017Do /npc removecmds and set the command again
-
View User Profile
-
Send Message
Posted Nov 30, 2016Pls update on 1.11 !! :) thanks
-
View User Profile
-
Send Message
Posted Nov 23, 2016@razorrider7
Razor its not my plugin, I just used a while on it and tried to make it work and this was the solution I found :)
You should ask the Author, but I dont think he would mind free advertising!
-
View User Profile
-
Send Message
Posted Apr 3, 2017In reply to noctusserver:
-
View User Profile
-
Send Message
Posted Nov 23, 2016@Cribb22
Did you make a delay on the kits in the Essentials?
-
View User Profile
-
Send Message
Posted Nov 22, 2016im simply to stupid for this Plugin!
Im trying to add an NPC with a essentials kit in the World. The Kit should be recievable 1 time every 7 days. But i cant create a NPCCommand for that.
If i try, the player gets nothing or he can use the command the whole time again and again...
really need help...
-
View User Profile
-
Send Message
Posted Apr 3, 2017In reply to Cribb22:
-
View User Profile
-
Send Message
Posted Nov 21, 2016When I right click an NPC on 1.11, it opens an empty gui?
-
View User Profile
-
Send Message
Posted Nov 21, 2016@trojan_viru5
Console makes the command run as if it was typed into the server's console. Also, you forgot the permission argument, which comes second. If you don't want it to require a permission, you should put "noPerm" (without quotes).
@noctusserver
That's really clever! I think you just made a very important/useful plugin. Would you mind if I put that link in the description?