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 Aug 20, 2015In my server. Why only op can click the npc and run command?? help! Are there anyother permission??
-
View User Profile
-
Send Message
Posted Aug 9, 2015@MrMindlessPvP
Just like in my previous posts, just use chest commands with this, chest commands (plugin) makes using this plugin super easy...
Also just like in my previous post "it's just a suggestion, you don't have to listen to me..."
-
View User Profile
-
Send Message
Posted Aug 9, 2015@YhzPoi
Use chest commands (plugin) to set up ur vault/pricing needs and have players click on the items in the gui to take money from their accounts...
Just a suggestion u don't have to listen to me...
-
View User Profile
-
Send Message
Posted Aug 9, 2015@CasparW
I'm very sure u can use this via bungee cord but if u can't, use chest commands (plugin) and u can do everything u need to through there...
I haven't had any issues on my 1.8.7 bungee cord server though...
EDIT: 1.8.8 bungee cord server...
-
View User Profile
-
Send Message
Posted Aug 3, 2015@Azen0x
What I did on my server was I got a plugin called Chest commands set mini games up in that plugin and when you right click a villager the menu popped up :D
-
View User Profile
-
Send Message
Posted Aug 1, 2015Can we enter commands with arguments (Ex: /mgm join TheGame) ?
-
View User Profile
-
Send Message
Posted Jul 27, 2015BungeeCord support?
-
View User Profile
-
Send Message
Posted Jul 15, 2015@xDizasterCYx
It was updated last August, I'm pretty sure it's already abandoned xD
-
View User Profile
-
Send Message
Posted Jul 12, 2015I can't use it in my spawn, because I made a region and everytime a player tries using it, it says "Sorry but you cannot use that in here" please help!
EDIT: I just flagged the spawn to /rg flag (region) interact allow, if anyone needed help on that.
-
View User Profile
-
Send Message
Posted Jul 11, 2015Absolutely great! I hope you won't abandon it :/
-
View User Profile
-
Send Message
Posted Jul 3, 2015Spigot 1.8.7 /npc select /npc addcmd ( true/false ) Only false works, nothing works if you use the true option. Great plugin, everything else works.
-
View User Profile
-
Send Message
Posted Jun 27, 2015Can you add a command price system using Vault please.
What I mean it cost money to the player to run the command.
-
View User Profile
-
Send Message
Posted Jun 18, 2015I need help. Im trying to make a quest, every 2 days, you can right click a villager (there are 3 and they are hidden around the server) and when you right click it, you get a nether star and once you get 3, you can sell them. But i deop my self and i held right click and it got the nether star everytime. But i only want it so they can right click it and get the item every 2days. The item is a kit..
-
View User Profile
-
Send Message
Posted Jun 18, 2015@MrMindlessPvP
Fixed it. I set perms
-
View User Profile
-
Send Message
Posted Jun 16, 2015@zferrell
I did /region flag {name} use allow and then i deoped my self and it doesn't open the command. which is /bar.
-
View User Profile
-
Send Message
Posted Jun 13, 2015Thank for amaziing plugin. Good works on spigot 1.8.7
-
View User Profile
-
Send Message
Posted Jun 5, 2015I just added this to my server and it works great with no problems on 1.8.3
-
View User Profile
-
Send Message
Posted May 30, 2015This works great for me in 1.8.6 (: No errors.
-
View User Profile
-
Send Message
Posted May 15, 2015Pls upload to 1.8.3!!
-
View User Profile
-
Send Message
Posted May 13, 2015@alexdoesclash799
i reply to my self now lol