CommandNPC

CommandNPC

21.5k Downloads
Hello all,
I just wanted to type this out and address the fact that I haven't posted a resource update in a while. The plugin is still being supported, and if anything needs to be updated or optimized to keep it running properly, I will update it and post a resource update, but due to my busy schedule, I have not been able to add new features. Please note that this project is NOT abandoned, and I am still maintaining it.
Yours truly,
Bradydawg

CommandNPC

We are now accepting suggestions for CommandNPC! You can suggest new features here: https://forms.gle/87MXV3kxQrYLV4Vw5

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! 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 [-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
  1. Edit config.yml to your likings
  2. Select the NPC you wish to add commands too.
  3. Use the command 'cmdadd' (Syntax listed above) to add the commands you wish.
  4. These commands will be saved.
  5. If you wish to remove the commands simply use the 'resetcmds' command. (Syntax listed above)
Metrics by bStats
Github
 About Me:
Hey! My name is Bradydawg. I'm a full stack developer, systems administrator, and "ubuntu goon". I've staffed on, owned, developed, and managed countless servers, and I've been developing plugins for Spigot/Bukkit for years. My mission for CommandNPC is to essentially provide support and updates for the Spigot community. I used this plugin, and ServerListMOTD (another plugin I provide support for) for years before they were abandoned. After they were abandoned, I decided to pick them up, and keep them free, because there's nothing better than finding the exact plugin you're looking for on Spigot, AND finding out that it's fully supported up to the latest version, AND free! I'd really appreciate it if you left a good review on my plugins, as that's really the only way of showing me that you appreciate what I'm doing. I hope you enjoy CommandNPC!