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 Jun 23, 2014@XxNaelxX
It soon will be!
-
View User Profile
-
Send Message
Posted Jun 23, 2014i found a fix for the commandNPC + MyCommand:
u need to add this to every command: registered: true
then it will work ;)
-
View User Profile
-
Send Message
Posted Jun 21, 2014is it possible to do 2 cmds at once?
-
View User Profile
-
Send Message
Posted Jun 21, 2014@FearTheCreeper19
is the command "server de" or "de"
-
View User Profile
-
Send Message
Posted Jun 19, 2014@messageofdeath
I have tried this and it doesn't seem to work, it just says unknown command. When i type in " /npc setcmd false server de " it doesn't seem to work.
-
View User Profile
-
Send Message
Posted Jun 16, 2014@shebatron1
You could do it with the commands probably like have it run with the player instead of running it in console. That way the plugin in question will know it's a player and teleport them there
-
View User Profile
-
Send Message
Posted Jun 16, 2014Hey will there be soon a way you right click the npc and it will teleport you to another server probably connected with bungee cord? That would be a great feature but I dont know if its ok to do since its a bit like those high up servers. But you dont have to do exactly what they did just make it where you right click the mob and it ports you to your other server. I tried doing it where I made it /npc setcmd server mg for when people right click the npc they will go to the server mg aka minigames but it was invalid.
-
View User Profile
-
Send Message
Posted Jun 15, 2014@th3rang3r
Hopefully within this upcoming week, but first I have to finish PaidRanks which i'm am also re-writing.
-
View User Profile
-
Send Message
Posted Jun 15, 2014When do you think u can update to 1.7.8/1.7.9 ? It depends on you mate! :D
-
View User Profile
-
Send Message
Posted Jun 15, 2014@OldPrelude
I am taking over this project and it will not go inactive!
-
View User Profile
-
Send Message
Posted Jun 15, 2014@PlusMCPKBPK
This is coming!
-
View User Profile
-
Send Message
Posted Jun 15, 2014@tjbruce
What type of variables would you like to see?
-
View User Profile
-
Send Message
Posted Jun 15, 2014@ZtheCdr
This will soon change! Once I take over the project again I will add unlimited amounts of commands as well as permission nodes on the NPC as well as permission nodes for the commands in the /npc command
-
View User Profile
-
Send Message
Posted Jun 15, 2014@MYKoxaxoxa
I will be adding a way to add unlimited amounts of commands in one NPC as well as permissions
-
View User Profile
-
Send Message
Posted Jun 15, 2014@XxNaelxX
I am soon to take the project back over into my hands and once that happens I will add this where you can add unlimited amount of commands in one NPC.
@MrQuibe
Eu também irá adicionar permissões.
-
View User Profile
-
Send Message
Posted Jun 14, 2014Can you add 2 cmds?
-
View User Profile
-
Send Message
Posted Jun 14, 2014Hey, any chances you will release the source for his? My server kinda depends on this and i want to keep a copy incase this gets inactive.
-
View User Profile
-
Send Message
Posted Jun 14, 2014Cara uma dúvida sobre: "Esse plugin não possui permissões, para poder setar o comando no NPC!", todos podem setar um cmd em um npc?
-
View User Profile
-
Send Message
Posted May 31, 2014It would be a nice idea to add an option of left click.
A way to add multiple commands would be using the plugin 'Commander'. The script would be something like:
/command/ =={
command1
command2
}
-
View User Profile
-
Send Message
Posted May 27, 2014Come on man, you got almost 4.5k downloads and there all asking for some really cool features that this plugin really, really needs. I really think that there a lot to do with servers that have this plugin, but then again, you cant even have multiple commands on one npc, so.....