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 Nov 6, 2016Hi, I need help. When I add command on my server to npc, only group with * can open that npc. can somebody help me?
-
View User Profile
-
Send Message
Posted Nov 6, 2016@noctusserver
This helped me so much! Thank you for this!
Much appreciated!
-
View User Profile
-
Send Message
Posted Oct 31, 2016As an addition to Trojans comment:
FOR BUNGEE:
This will teleport players to other servers
This work with 1.10.2 - Citizens CommandNPC MicroJump (https://dev.bukkit.org/bukkit-plugins/microjump/)
/npc create Test - And now add this command "/npc addcmd noPerm false server SkyBlock"
So the SkyBlock can be replaced with any of your servers name. I spent a lot of time trying to figure it out, so I hope this helps someone.
I hope this helps someone, have a great day!
-
View User Profile
-
Send Message
Posted Oct 27, 2016For anyone wondering:
Yes this works on the current version of Citizens, Jobs Reborn and 1.10.2.
Command usage example:
/npc addcmd false %name jobs browse
1. "/npc addcmd" This syntax only works when you have an NPC selected (/npc select)
2. "False" I still don't know what this is for... It says Console but i've found setting it to "true" prevents the commands from working.
3. "%name" This is to ensure the player right clicking the NPC is using their appropriate permissions. This is useful for if you have limitations to some group users but not others.
4. "jobs browse"
Notice I did NOT say "/jobs browse". The forward slash is not needed for the command argument.
If this is a bug, it's worth notifying the creator.
-
View User Profile
-
Send Message
Posted Oct 2, 2016Seems Legit!
Im Installing it now!
-
View User Profile
-
Send Message
Posted Aug 30, 2016@Bodyash
This is your own problem. Add a cooldown to the command or something.
-
View User Profile
-
Send Message
Posted Aug 17, 2016Someone find a great way to crash server.
http://pastebin.com/2WniHtWZ
Can u try to fix that?
-
View User Profile
-
Send Message
Posted Jul 28, 2016@stickym2323
Maybe /npc addcmd true noperm coins give %name (amount) The "coins give %name (amount)" part would be the plugin giving the player something, the command varies on the plugin you use.
-
View User Profile
-
Send Message
Posted Jul 28, 2016@Enderking_1
For bungeecord it's client-sided so a /sudo command won't work. (From my experience)
-
View User Profile
-
Send Message
Posted Jul 28, 2016Plugin still works fine on 1.10.2...
-
View User Profile
-
Send Message
Posted Jul 25, 2016How can i make players to use the npc command just on the first time and then they wont be able to use it ?like giving free coins
-
View User Profile
-
Send Message
Posted Jul 21, 2016How do I set it up so when a player clicks on the npc the /server command will be executed and the player will go there?
-
View User Profile
-
Send Message
Posted Jul 18, 2016Update please. This plugin is taking a lot of your server. But its very usefull! :D So please update! :D
-
View User Profile
-
Send Message
Posted Jul 17, 2016FYI for those wanting a 1.10 update! Latest available download WORKS UP TO 1.10.2
-
View User Profile
-
Send Message
Posted Jun 22, 2016it wont work for minecraft 1.8.7
for CommandNPC v1.7.3
or do i use v1.7.2?
-
View User Profile
-
Send Message
Posted Jun 19, 2016Umm can you give me the link to the 1.8.3 download?
-
View User Profile
-
Send Message
Posted Jun 14, 2016please update to spigot 1.10 thanks
-
View User Profile
-
Send Message
Posted Jun 13, 2016with ice sheets to apply rule 1.9 no link
-
View User Profile
-
Send Message
Posted Jun 10, 20161.10 update???
-
View User Profile
-
Send Message
Posted Jun 9, 2016Someone don't know how to setup commands. Setup like this: