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 11, 2014@messageofdeath
hey can you a cooldown and warmup options?
-
View User Profile
-
Send Message
Posted Aug 9, 2014@madtomic
I don't think so because this plugin uses UUID's which isn't supported in 1.7.2
-
View User Profile
-
Send Message
Posted Aug 9, 2014@LivengoodGaming
You can download other plugins and use their built in commands in association with the plugin to complete your dream.
-
View User Profile
-
Send Message
Posted Aug 9, 2014@smokeymcjay
This plugin only works with Citizens 2
-
View User Profile
-
Send Message
Posted Aug 9, 2014@tjbruce
@delsolsi213
I'll fix this as soon as possible.
EDIT: Here's a link to the fixed version http://dev.bukkit.org/bukkit-plugins/cmdnpc/files/10-command-npc-v1-7/
-
View User Profile
-
Send Message
Posted Aug 9, 2014Does this only work with villagers or can it run with citizens?
-
View User Profile
-
Send Message
Posted Aug 8, 2014Will the latest build work for cb1.7.2-r0.3?
-
View User Profile
-
Send Message
Posted Aug 5, 2014i think i have found the problem with deoping people
in the file me.messageofdeath.CommandNPC.Listener.NPCListener line 54 the plugin deops the user without checking if they were op in the first place it has the code to check if the player was originally op on line 57 / 58
from what i saw, you should just be able to delete / comment out line 54 to fix the problem
-
View User Profile
-
Send Message
Posted Aug 5, 2014@delsolsi213
Same, it deop's me. Please Fix
-
View User Profile
-
Send Message
Posted Aug 5, 2014How do I make it so it gives items to players or msg's them?
-
View User Profile
-
Send Message
Posted Aug 4, 2014@messageofdeath
plugin is deoping me when right clicking an npc and running a command.
-
View User Profile
-
Send Message
Posted Aug 3, 2014Get v1.6 early! Custom Permissions are fixed! http://dev.bukkit.org/bukkit-plugins/cmdnpc/files/9-command-npc-v1-6/
-
View User Profile
-
Send Message
Posted Aug 3, 2014@delsolsi213
This was already fixed a while back, make sure to use the latest version.
-
View User Profile
-
Send Message
Posted Aug 3, 2014@messageofdeath
Hey, not sure if you know about it allready or not but after restarts the npc's seem to loose the commands assigned to them.
-
View User Profile
-
Send Message
Posted Aug 2, 2014@iTossico
No problem man and thanks!
-
View User Profile
-
Send Message
Posted Aug 2, 2014@Victhetiger
No problem ;)
-
View User Profile
-
Send Message
Posted Aug 2, 2014@ANewman72
Make sure that Citizens 2 is installed correctly on the server as it is required to run this plugin.
-
View User Profile
-
Send Message
Posted Aug 2, 2014@rods355
Yes, just recently I added the feature within the latest builds you can now add multiple commands to 1 npc! Just keep using the 'addcmd' command to add more commands to the NPC
-
View User Profile
-
Send Message
Posted Aug 2, 2014@hellobgbg
The smallest mistakes can be the biggest mistakes. Thanks for bringing this up, in the next update it will be fixed for sure.
-
View User Profile
-
Send Message
Posted Jul 31, 2014@messageofdeath
I have installed your plugin on my server for kit purposes and even though its installed in my plugins folder, I am unable to use it in-game. PLEASE HELP!! :(