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 17, 2014can you add more 1 command ?
-
View User Profile
-
Send Message
Posted May 12, 2014Could you please give a list of variables (e.g. %**)
I want the console to tell a player something.
Thanks!
-
View User Profile
-
Send Message
Posted May 12, 2014Dont works for me on 1.7.9.
Can you pls update?
-
View User Profile
-
Send Message
Posted May 5, 2014Need the ability to add multiple commands. Do you think you could add this?
I am trying to use mycommands to add several commands to a NPC but it does not work for some odd reason.
-
View User Profile
-
Send Message
Posted May 5, 2014Oh and can you do multiple commands per click on a NPC?
-
View User Profile
-
Send Message
Posted May 5, 2014I am looking for a plugin which allows me to have a player right-click (or left-click) an NPC and then make the NPC talk to the player (a random message).
I know I can have the npc message the player (/msg) with this plugin ... but is there a way to have the npc msg or say a random sentence to the player?
Examples:
1.) Hi, how are you?
2.) Hi, how can I help you?
3.) Hi nice wheater today!
Right-click NPC shows a random message (1, 2 or 3).
How can I do this?
-
View User Profile
-
Send Message
Posted Apr 28, 2014@Nikk96
write /npc setcmd false chc open admin-console
-
View User Profile
-
Send Message
Posted Apr 22, 2014@MCer202
Do you have citizens?
-
View User Profile
-
Send Message
Posted Apr 19, 2014This plugin does work with any commands. Problem is when you restart/reload the commands get erased. :/
-
View User Profile
-
Send Message
Posted Apr 18, 2014Hmm my database.yml is empty... why??
-
View User Profile
-
Send Message
Posted Apr 18, 2014Yup - none of the commands work for either plugin. When I do any command, it just appears up blank, no response.
-
View User Profile
-
Send Message
Posted Apr 18, 2014This doesn't work for me - is there anything that it requires?
-
View User Profile
-
Send Message
Posted Apr 11, 2014ok, so i have it connected to this plugin: http://dev.bukkit.org/bukkit-plugins/chest-commands/ it worked before when i binded the command to that plugin.. but now it doesn't? - I can open the GUI by the original command, but now it wont work with my NPC? :/ I dont get any errors
-
View User Profile
-
Send Message
Posted Apr 6, 2014Is there a way to run two different commands?
like, pick a race. you click npc and it teleport to next area to pick your class. etc.
-
View User Profile
-
Send Message
Posted Apr 5, 2014@MisterAJC
No .. /server is a bungee command ! It doesn't work in console or in game ! It work with a proxy: BungeeCord. You have to put a integration of BungeeCord. It is not possible just with console or ingame.
-
View User Profile
-
Send Message
Posted Apr 2, 2014@NoahWL1
try, /npc setcmd false server lobby It doesn't work, go to the plugins folder of the server, access the folder cmdnpc, and visit the yml file found there, and see if the command set is there!
-
View User Profile
-
Send Message
Posted Apr 2, 2014@macogamepack
you need another plugin to allow you to sudo bungeecord commands such as /server
-
View User Profile
-
Send Message
Posted Apr 2, 2014Hi, I have command /server lobby I set NPC to == /npc setcmd true server lobby == But, when I click on NPC, it says "Unknow command. type"/help" for help" What's wrong? Thank you so much :)
-
View User Profile
-
Send Message
Posted Apr 1, 2014It doesn't work in 1.7.4 :( When I right click it does nothing.
-
View User Profile
-
Send Message
Posted Mar 27, 2014After i restart server its aoutomatic delete comand and if i click on npc its say /help i tried also /spawn but it doest work