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 Aug 20, 2014@techgeek25
Try downloading the latest version of Citizens 2 and provide feedback.
-
View User Profile
-
Send Message
Posted Aug 20, 2014@gnaxi
I would need a better description of what's happening or me join your server and help. Skype: messageofdeath
PS I am quite busy so it might be a few days until I get back to you.
-
View User Profile
-
Send Message
Posted Aug 20, 2014@IIxUnderWorldxII
It shouldn't anymore with the latest version v1.7
-
View User Profile
-
Send Message
Posted Aug 20, 2014@drew5494
Thank you!
-
View User Profile
-
Send Message
Posted Aug 18, 2014When I start the server, the error below happens. How do I fix it?
http://pastebin.com/f81YUWFn
-
View User Profile
-
Send Message
Posted Aug 18, 2014Please add compatibility for ChestCommands GUI - For some reason it does not work
-
View User Profile
-
Send Message
Posted Aug 17, 2014It won't enable. It says I do not have Citizens.jar, but I do.
-
View User Profile
-
Send Message
Posted Aug 17, 2014Can't seem to make this work at all anymore.
I have to be OP to be able to right click the NPCs, even with the correct permission given.
EDIT: I got it to work again, but I had to set the perm value to "noperm", even though the users do not have that permission for the command by default. What have changed? O_o'
-
View User Profile
-
Send Message
Posted Aug 17, 2014Does this still remove your OP?
-
View User Profile
-
Send Message
Posted Aug 16, 2014Great plugin!
-
View User Profile
-
Send Message
Posted Aug 16, 2014@IIxUnderWorldxII
Upgrade to v1.7.1 http://dev.bukkit.org/bukkit-plugins/cmdnpc/files/11-command-npc-v1-7-1/
-
View User Profile
-
Send Message
Posted Aug 16, 2014@gnaxi
@tjbruce
@IIxUnderWorldxII
@DuskFireHD
I just got back on and saw this. This is because I converted the project to maven and then removed it and it just put the plugin.yml in a src folder in the jar. It's still there but bukkit can't find it. Download v1.7.1 here http://dev.bukkit.org/bukkit-plugins/cmdnpc/files/11-command-npc-v1-7-1/
-
View User Profile
-
Send Message
Posted Aug 16, 2014if you add me on Skype lucas.bell101 I have a 1.6.4 version or just a working version of it ??
-
View User Profile
-
Send Message
Posted Aug 15, 2014No-one knows :P
-
View User Profile
-
Send Message
Posted Aug 15, 2014Lol When will it be fixed
-
View User Profile
-
Send Message
Posted Aug 15, 2014Why hasn't he fixed this? I was told he forgot to add the plugin.yml on the update.
-
View User Profile
-
Send Message
Posted Aug 14, 2014Hey Every Time I Click It Deops Me Heaps Of People Have Been Getting This Problem Hoe Do I Fix It
-
View User Profile
-
Send Message
Posted Aug 14, 2014Every time I use it deops me, can someone help?
-
View User Profile
-
Send Message
Posted Aug 13, 2014@gnaxi
Same Problem. Plugin.yml is Invalid for some reason.
-
View User Profile
-
Send Message
Posted Aug 12, 2014The new release 1.7 doesn't work:
[14:50:34] [Server thread/ERROR]: Could not load 'plugins/CommandNPC.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[Survival.jar:git-Spigot-1595]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [Survival.jar:git-Spigot-1595]
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [Survival.jar:git-Spigot-1595]
at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [Survival.jar:git-Spigot-1595]
at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [Survival.jar:git-Spigot-1595]
at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [Survival.jar:git-Spigot-1595]
Caused by: java.io.FileNotFoundException Jar does not contain plugin.yml