Sueta

| ASCommands | - Remake of asCMD - |

v1.0.1

Remake of https://www.spigotmc.org/resources/ascmd-armor-stand-command-great-for-lobby-servers.41127

·Plugin



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 <method> <command> - Adds command to armor stand - see Usage.
  • /ascmd clear - Clears commands from armor stand - see Usage.


Permissions:

  • ascmd.admin - The only permission for all subcommands


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

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

v1.0.1

  • pre - The specified command will be executed by PlayerCommandPreprocessEvent (Ex. Chest Commands GUI). You can use /ascmd addcmd pre menu - to open menu command in ChestCommands GUI


Configuration:
There is no configuration is this version, maybe in future I will add it. In config.yml are stored all armor stands and commands so far.

In version v1.0.1 or higher, you can use in NoPerms placeholder %perm% to get permission.

config.yml v1.0.0
Prefix: "&f&lASCMD &f%arrow-% &7"
Type: ARMOR_STAND # Change this, if you want configure another entity
Permission: "ascmd.admin"
Debug: false

AllCleared: "All commands cleared!"
Added: "Command added!"
Args: "Too few arguments!"
Now: "Now R-Click on ArmorStand to add command on it."
NowDelete: "Now R-Click on ArmorStand to remove command on it."

Methods: "Console, Player, Bungee (no %method%)"

EditEnabled: "Edit mode enabled."
EditDisabled: "Edit mode disabled."

NoPerms: "Sorry, but you don't have permission to use that command! (ascmd.admin)"
config.yml v1.0.1
Prefix: "&f&lASCMD &f%arrow-% &7"
Type: ARMOR_STAND # Change this, if you want configure another
Permission: "ascmd.admin"
Debug: false

AllCleared: "All commands cleared!"
Added: "Command added!"
Args: "Too few arguments!"
Now: "Now R-Click on ArmorStand to add command on it."
NowDelete: "Now R-Click on ArmorStand to remove command on it."

Methods: "console, player, bungee, pre (no %method%)"

EditEnabled: "Edit mode enabled."
EditDisabled: "Edit mode disabled."

NoPerms: "Sorry, but you don't have permission to use that command! (%perm%)"


Compatibility:
If you have ChestCommands on server and a menu with configured command to open it, you can't add the command with player method on an Armor Stand. It's known bug and I still don't know how to fix it. BUT you may use command cc open <filename> %player% with console method. Example: /ascmd addcmd console cc open mymenu.yml %player%

This bug fixed in version v1.0.1 with new method pre

Similar projects

Plugin →