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 Jul 8, 2014can you actualize it to R0.2 thx
-
View User Profile
-
Send Message
Posted Jul 8, 2014i can't install the plugin, im in the 1.7.9
-
View User Profile
-
Send Message
Posted Jul 7, 2014I Am Really not shure if this is Possible but,
I Have an Enjin Plugin and i want an NPC To /buy but it's not working Same thing with the Simple Trails Plugin :/
Thanks
-
View User Profile
-
Send Message
Posted Jul 6, 2014@gnaxi
I have fixed the algorithm for running the commands and made it more efficient as well as fixing the permission issue!
Download it here! http://dev.bukkit.org/bukkit-plugins/cmdnpc/files/7-command-npc-v1-4/
-
View User Profile
-
Send Message
Posted Jul 6, 2014@gnaxi
I'll notify you as soon as I fix that problem with the permissions!
-
View User Profile
-
Send Message
Posted Jul 6, 2014@Fabricio20
Thanks man!
-
View User Profile
-
Send Message
Posted Jul 6, 2014Awesome Plugin! Works as said and u can do complicated things with it! ;)
-
View User Profile
-
Send Message
Posted Jul 6, 20141.3 works fine with me, through I'm just putting false for permissions...
-
View User Profile
-
Send Message
Posted Jul 6, 2014No worries messageofdeath! 1.2 is still working great for me, so I just downgraded and everything is working fine again :)
-
View User Profile
-
Send Message
Posted Jul 5, 2014@MrCreeperITA
BetterAlias doesn't have a developer api.
BungeeCord I have no experience with but will try my best to implement this feature in the future.
-
View User Profile
-
Send Message
Posted Jul 5, 2014@natedog1177
I'll try to have this fixed by tomorrow as I am very busy today.
-
View User Profile
-
Send Message
Posted Jul 5, 2014@gnaxi
I'm very sorry for this, I didn't test the permission part. I based the permissions off of theoretical probability. I'll fix this as soon as possible! I want you and the users to have a great experience with my plugin!
-
View User Profile
-
Send Message
Posted Jul 5, 2014dependence BetterAlias​​? or BungeeCord?
-
View User Profile
-
Send Message
Posted Jul 5, 2014@messageofdeath
Thank you, i do really like the plugin though. happy to know i am not the only one with the issue and hope its fixed in the future, but everything else besides that factor works great.
-
View User Profile
-
Send Message
Posted Jul 5, 2014I can't recommend upgrading to 1.3.
It doesn't work at all anymore.
The "<customPerm(noPerm)>" doesn't register. Users doesn't get the permission requested in the command making the commands obsolete.
Downgrading for now.
-
View User Profile
-
Send Message
Posted Jul 4, 2014@natedog1177
Coming to think about it, this might be a problem with how I have the algorithm setup. I will look into this matter and fix it in the next update!
-
View User Profile
-
Send Message
Posted Jul 4, 2014@JackzMc
I will keep this feature in mind. I will see about implementing it soon!
-
View User Profile
-
Send Message
Posted Jul 4, 2014A delay until the next command as a feature?
Like this:
- say Command 1
- %wait10s
- say Command 2
/say Command 2 goes off 10 seconds after /say Command 1
-
View User Profile
-
Send Message
Posted Jul 4, 2014@GameForces
Like if the command your giving the npc to use is /spawn
replacing noPerm with Essentials.spawn works if the group the player is in also has that node
example: /npc addcmd false Essentials.spawn spawn but having the perm set as noPerm fails to work for me atleast.
-
View User Profile
-
Send Message
Posted Jul 4, 2014@natedog1177
what do you mean with correct perm node?