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.
And another thing, when you want a command, like /eco give {player} 1000, what do you type for the player name? To make it give the money to the player, so like /eco give ???? 1000, we need the variable so it can give the money to the person who issued the command, Thanks!
Hi, I would like to use this command, for my HUB server, but it doesn't work with bungeecord? For example, i set the command to server:hub, /server hub, server hub, and it says unknown command, can you please add a bungeecord hook? Thank you very much!
Guys who can help me by donating any amount already a great help, since I'm leaving aside requests for plugins just to devote myself to cmdNPC
@DerekZil
Could talk about their incredible ideas?
WARE THE HELL IS THE DOWNLOAD== >:(
Make a {Name} variable so I can do awesome stuff please! xD
@ragthanatos123
sorry?
can you make that there are more commands on one npc, and when you click he choose a random command.
gr. Kylian
Only one thing,
Instead of Dispatching command....
Make it to where we can configure that.
Great work! Love this a lot. Good byyyyyye denizen :)
Don'tpm me the downloadThis would be awesome! Btw Citizens npcs can talk ...
@Mre30 Hehe :P!
this comment has absolutely nothing to do with giving me a PM for the download link. Nothing at all.
@MisterAJC
well... why not rely on citizens?
If you dont... then most of use will have to settle with denzien... which we dont. I hate making 585470857 scripts for each npc.
Omg that awesome ! I will this plugin for m'y server :) (sorry bas english i'm french)
Guys, while the plugin is not released by bukkit I can see what I can improve in version 1.1 and was thinking of not relying on more of the citizens, ex: /setvillager <name> If someone can do this let me know, because I'm not getting?
@MrInspector
Dude.. nice profile pic XD
I actually had a PM this once "Is that really you in your pic?" I couldn't stop laughing!
@Mre30
You're not, the link will be removed, just file a report and we'll handle it if you see people posting unapproved links.
Also @MisterAJC, I'd like to thank you for not posting unapproved file links even though you have over 2 pages of people saying "WHERES THE DOWNMLOAD!!?!/111/1/221@#"
@Mre30
yea man this plugin is soo easy and also very very good
please send me the downloadlink per PN <3