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 May 13, 2015@pinoylifecraft727
same here
-
View User Profile
-
Send Message
Posted May 6, 2015@subtletyer
Works fine for me? I am not the author but I may be able to help if you add my skype: Bellator have a great day!
-
View User Profile
-
Send Message
Posted May 5, 2015This plugin dont work with 1.8.3.
-
View User Profile
-
Send Message
Posted May 2, 2015@pinoylifecraft727
Pretty sure you need to set the region flag for "use" to "allow". I think it's "use", but it could be a different flag, just try a couple of them out.
-
View User Profile
-
Send Message
Posted Apr 18, 2015can you make it for 1.8.1
-
View User Profile
-
Send Message
Posted Apr 16, 2015Plugins
I create a NPC and when i use default player cuz i test it! then the worldguard says : Hey! You can't use that there.
Help Me!
-
View User Profile
-
Send Message
Posted Apr 13, 2015im having trouble getting commandNPC + Globalmarket to work together, it seems i cant get the npc to recognize a player name in it.
when using the following command /npc addcmd false noperm market listings it allows me to right click the npc and open the market UI, however when ever i try to interact with it, it closes out.
when using the command /npc addcmd false noperm sudo %name market listings < aka forcing the npc to recognize the player. i get the same instance, clicking or interacting with the UI makes it close out. im simply trying to create a RPG Auction house aspect with these plugins.
Any help of suggestions would be amazing.
-
View User Profile
-
Send Message
Posted Apr 10, 2015The command format could not be any more confusing.
-
View User Profile
-
Send Message
Posted Apr 3, 2015Plugin works great, my versions:
ver Citizens
[03:12:30 INFO]: Citizens version 2.0.15-SNAPSHOT (build 1222)
[03:12:30 INFO]: Website: http://www.citizensnpcs.co
[03:12:30 INFO]: Authors: aPunch and fullwall
ver CommandNPC
[03:13:22 INFO]: CommandNPC version 1.7.2
[03:13:22 INFO]: Author: messageofdeath
ver
[03:12:31 INFO]: This server is running CraftBukkit version git-Spigot-c136710-0
af2738 (MC: 1.8.3) (Implementing API version 1.8.3-R0.1-SNAPSHOT)
-
View User Profile
-
Send Message
Posted Apr 2, 2015@Nivek71Minecraft
I even installed it on a clean Minecraft with no other plugins, this is what I get: http://i.imgur.com/B2nK7nY.png
-
View User Profile
-
Send Message
Posted Apr 1, 2015@HRSN0410
I really want this plugin in 1.8. You said that you have updated it? Please can I try it..? :)
-
View User Profile
-
Send Message
Posted Apr 1, 2015Please update this to 1.8
-
View User Profile
-
Send Message
Posted Mar 29, 2015@Ripdog1
That basically means that something is wrong with the installation. What I've found is it's usually because the plugin is on the wrong version. What version of minecraft are you using for your server?
-
View User Profile
-
Send Message
Posted Mar 29, 2015I have put Citizens 2 in the plugins, just that alone, I'm not able to do the /npc command. I know it's loaded because it would say Unknown Command, but when I do enter the command, nothing happens or shows up. I've put it on a complete separate server where the plugin is on it's own, still does not work. Any help?
-
View User Profile
-
Send Message
Posted Mar 29, 2015@conetopia3000
Try this:
/npc select (to select the NPC) /npc addcmd false noPerm market listings
Basically... the command "/market listings" will be run by the player.
Hope I helped :)
-
View User Profile
-
Send Message
Posted Mar 25, 2015Npc with command to give me wood?
/npc create name npc addcmd true noperm give wood 1
no context error. how do I make it realize the player that hit the npc?
Edit: Nvm, ( hope this helps some players/servers ) /npc sel * to select the npc* /npc addcmd true noperm sudo %name market listings If i did for example... /npc addcmd true noperm %name market listings the console would say [market] player context required. Meaning the npc command is forcing console to run the command with no player name in mind.
so Command npc plugin is a little broken, but works great with the essentials Sudo command. Im sure you can do that work-around with other plugins that have a similar method.
-
View User Profile
-
Send Message
Posted Mar 22, 2015UPDATE: I tested this out on my server, and it works with no error messages in the console or anything. It was what Chakles said (missing "break;" after the interact case in the click type config).
ORIGINAL COMMENT:
I updated this to 1.8.1. I will not publish this unless messageofdeath gives me permission to do so.
I also fixed the bug that runs the command twice on right click :)
As I am not that skilled of a developer, I will not be adding any features. But I will update this when needed. (assuming that I have permission from the developer)
-
View User Profile
-
Send Message
Posted Mar 20, 2015If anyone is able to... Could you guys update it to spigot 1.8-1.8.3
-
View User Profile
-
Send Message
Posted Mar 17, 2015Could you please update to 1.8.1 is this even still active?
-
View User Profile
-
Send Message
Posted Feb 20, 2015@NightWalkerZed Yes please, This currently doesn't work on Spigot 1.8 could you update it and give me the link Thanks EDIT: Also can you add variables so eg. {Name} {World} This can be used for /eco give {name} 100 For example and this could be useful for other things thanks!