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 Apr 22, 2017Hello do somebody know how to setup when somebody clicks the npc and the command is eco give <somebody> money it says he dont have permissions but i dont want to give him a permission for eco bcs he could cheat 458453465 money
-
View User Profile
-
Send Message
Posted Apr 24, 2017In reply to Forge_User_32854335:
-
View User Profile
-
Send Message
Posted Apr 15, 2017Nice thanks you for update :D
-
View User Profile
-
Send Message
Posted Apr 13, 2017How do i make it so when clicked they lose so much money? (Essentials for ECO)
is it---
/npc addcmd -v (space)? $100 (command)
Im stuck
-
View User Profile
-
Send Message
Posted Apr 18, 2017In reply to Boyjedi:
-
View User Profile
-
Send Message
Posted Apr 13, 2017Can you not edit the messages from the config file? Thanks.
-
View User Profile
-
Send Message
Posted Apr 9, 2017MessageOfDeath! The newest plugin is not working very well because if I type /help CommandNPC
the server just stops and when I want to reset the commands than also stops. I run my server on 1.8. If you can please fix this bug!
Thanks
- Gobli
-
View User Profile
-
Send Message
Posted Apr 11, 2017In reply to Forge_User_77140895:
-
View User Profile
-
Send Message
Posted Apr 9, 2017Hi, I wanted to know if it's possible to do this: so i've setup an npc command for kits, and i have a vip kit that i want players to claim after a certain amount of time but they can claim it anytime by clicking the npc is their a solution please help.
-
View User Profile
-
Send Message
Posted Apr 11, 2017In reply to saeednadhim:
-
View User Profile
-
Send Message
Posted Apr 8, 2017Best NPC plugin ever. If there's a rating feature I'll absolutely give you 5 stars without doubt. Thanks for taking so much time on this fantastic plugin. Do you have any plans on supporting the PlaceholderAPI for the command variables? For example if I wanna give my player his rank's kit I should do /kit give %name %player_group%_weekly.
-
View User Profile
-
Send Message
Posted Apr 9, 2017In reply to BirkhoffLee:
-
View User Profile
-
Send Message
Posted Apr 5, 2017Economy support will be added soon! Charge a fee per command run!
-
View User Profile
-
Send Message
Posted Feb 27, 2017ok
-
View User Profile
-
Send Message
Posted Feb 25, 2017how do i attach a server command to the npc, ive tried "server creative" but its telling me its a unknown command.
-
View User Profile
-
Send Message
Posted Mar 4, 2017try server:creative
-
View User Profile
-
Send Message
Posted Mar 15, 2017doesn't work
-
View User Profile
-
Send Message
Posted Feb 24, 2017Does this require any other plugins in order to work?
It does not work.
I have vault installed for other plugins could this be the problem?
-
View User Profile
-
Send Message
Posted Mar 4, 2017Try to add citizens plugin
-
View User Profile
-
Send Message
Posted Feb 19, 2017I use this plugin for one of my minigames (Mob Arena), to select classes, but only op's can right click the npc and get the classes items. Is there another permission node other than commandnpc.admin that allows players to interact with the npc? I have removed to world guard region to make sure it wasn't world guard and it still doesn't work.