This plugin is the easiest and the best plugin to add commands on rightclick on an Armor Stand. This plugin is also lightweight as far as it goes. Next thing this plugin can do is protecting the Armor Stands from destroying and stealing items from them.
The plugin will protect only Armor Stands with bound commands on them!
What can this plugin do?
- Add commands to armor stands
- Protect armor stands
Commands:
- /ascmd edit - Toggles edit mode - only in edit mode you can edit items on armor stands and also destroy them.
- /ascmd addcmd [rRlL] <method> <command> - Adds command to armor stand - see Usage.
- /ascmd clear - Clears commands from armor stand - see Usage.
- /ascmd info - Writes all commands on an armor stand to chat
- /ascmd reload - Reloads the config
- /ascmd config <key> <value> - Sets config's key to value without manually opening and editing config.yml. Keys can be: msgToConsole, enableLeftClick or cooldownMs
- /ascmd update - Checks for new updates
Permissions:
- ascmd.admin - The only permission for all subcommands
- ascmd.update - Permission to get notified when update is available
Usage:
Adding command:
- Use /ascmd addcmd <console/player> <command>
(ex: /ascmd addcmd console say %player% is the best)
You can use %player% placeholder, which will get replaced by nickname of player who clicked the armor stand.
- Rightclick on armor stand to add command on it
- Done
Adding BungeeCord server teleport:
- Use /ascmd addcmd bungee <servername>
(ex: /ascmd addcmd bungee kitpvp)
- Rightclick on armor stand to add command on it
- Done
Clearing commands:
- Use /ascmd clear
- Rightclick on armor stand to delete all commands on it
- Done
Adding command to only work with right/left click:
- Adding command to work only on right click:
- /ascmd addcmd rR console say Clicked with RMB
- r will enable right clicking without shift (sneak), R will enable right clicking with shift (when sneaking)
- Adding command to work only on left click when not holding shift:
- /ascmd addcmd l bungee survival
- l (lowercase L) will enable left clicking when not holding shift (not sneaking)
- Adding command to work only when clicked holding shift (sneak button):
- /ascmd addcmd LR player me is sneaky
- L will enable left clicking when sneaking, R will enable right clicking when sneaking
- You can combine everything as you want, you can add some commands to be run on left click and other commands to be run on right click on the same armor stand
- When you omit any of the filtering letters (rRlL), the command will work with all kinds of clicks
- In order for left clicking to work you have to enable 'enableLeftClick' option in the config
- All older armor stand commands are fully working as they were until this update - this update is fully backwards compatible
Methods:
- console - The specified command will be executed from console
- player - The specified command will be executed by player who clicked the armor stand
- bungee - The specified server will be teleported player to. Ex: /ascmd addcmd bungee kitpvp will send player to BungeeCord server named kitpvp
Configuration:
Code (YAML):
format-version
: '2'
# Do not ever change this
config:
msgToConsole
: true
# If true, you will get messages to console about executed command on click on an armor stand
enableLeftClick
: false
# If true, players will be able to leftclick the armor stands. It will work the same like the player right clicked the armor stand
cooldownMs
: 100
# Cooldown in milliseconds needed between armor stand clicks (per player). If you set this for example to 1000, a player can use armor stand at most once a second.
You may decompile plugin if you want (but please don't claim it as your own work, link to spigotmc resource will be enough). You may post suggestions on this page and maybe I will add some of them to plugin in the next version. The plugin MAY work on the other versions, but I haven't tested it. BTW this plugin is my first plugin I've ever made.
Compatibility:
Compatible with both plugin.yml and PlayerCommandPreprocessEvent commands.
Videos:
In Spanish language (v2.0):
Thanks,
surdo
In English language (older version):
Thanks,
NhutThinhVN
Milestones:
2^8 downloads <3
2^9 downloads <33
2^10 (1024) downloads <333
2^11 (2048) downloads Thanks a lot!
2^12 (4096) downloads Wow!
2^13 (8192) downloads Thank you all!
2^14 (16384) downloads Amazing!
2^15 (32768) downloads Nice!