CommandTools
Features
CommandTools is a small plugin that allows you to execute commands simply by right-clicking an item.
- Multiple commands can be assigned at once, using the book edition interface to manage a tool's commands, therefore creating a 'script'.
- Commands are executed at the position you are looking at (for example, worldedit's chunk command will select the chunk you are looking at).
- Tools are persistent, i.e. they will still work after the owner disconnects, put his tools in a chest, or if the server is restarted.
- You can manage all your saved tools using the /ctool command (see the commands section below).
- Tools can be shared with other player the same ways you can share any other item, by simply dropping them or putting them in a chest. However, they will only be able to use them if they have the commandtools.ctools permission.
- An user can use a command in a script only if they have the appropriate permission, like if they used it normally.
- Tools can be renamed, and giving different tools the exact same name is fine (they will be given an automatically generated internal ID in this particular case).
- The # and ' characters can be used to comment a line in a tool's script.
Quick Tutorial
You can create and use Command Tools very easily, by following these few steps :
- Make sure you have an item in your hand, like a stick (any item or block will also work fine).
- Use the */ctool new* command, that will create a new tool in your hand.
- Use the */ctool edit* command, open the given book, and add the commands you want your tool to execute (for example, /say Hello world !).
- Close the book, and you can now right-click your tool to execute the given commands !
Commands
Command Tools are managed via the /ctool command. Since version 1.1, you can use the /ctool help command to get in-game help about all the supported commands. Here is a short extract :
- /ctool new : creates a new tool, using the item you currently have in hand (the actual item used to create the tool will be put back in your inventory).
- /ctool edit : transforms the tool you have in hand to an editable book, containing the tool's script. You can edit this book's content, and changes will be applied to your tool once you close the book, transforming it back to your tool.
- /ctool list : shows a list of all the tools saved, i.e. all the tools you created using /ctool new.
- /ctool get <name> : gives you the tool matching the given name.
- /ctool rename <name> : renames the tool you have in hand with the given name.
- /ctool delete : deletes the currently held tool from your hand and from the saved tools. The tool is therefore permanently lost.
Permissions
Currently, there is only one pemission : commandtools.ctools, that allows using Command Tools and the /ctool command.
Miscellaneous
I am open to any feature suggestion, and of course to bug reports on the plugin's Git repository. :-)
You can find the plugin's Git repository in here : https://github.com/prokopyl/CommandTools/ .
If you want to download experimental and unstable development versions, you can find them on Jenkins : http://jenkins.carrade.eu/job/CommandTools/ (adorably hosted by AmauryPi).
Enjoy ! :-)
I want to take my time to thank you!
I have been searching for days for a plugin just like this. The plugins I have tried either don't work with 1.8 or when I try an assign a command to them it doesn't work the way I want it, for example: I assign the command /fly to a stick, Then every stick has that command not just that stick that I assigned the command to! That really wasn't what I was looking for. But with this it gives each item it's own unique id :D
I have used this plugin for about 5 minutes and I already love it! Thank you! <3
@Nipshu
(Sorry for the response time, I have been quite busy for a while)
I did not explicitly say it on the presentation page (fixed now), but a player can only use a command in a command tool if he already has access to this command. In your case, if your player cannot do a command like /givecash 100 in his own prompt (which seems normal), then a command tool containing the same command will fail, if the same player uses it.
So, if you want your player to actually get his cash from a command tool, you should use a command that checks if he has money to withdraw, and gives him if it is the case.
However, what I could do is adding a ctool.useonly permission, that allows players to only use commmand tools that are explicitly given to them (by using a command like /ctool give, not by taking them from a chest or picking them on the ground), and that does not allow to edit them.
Because CommandTools is currently designed for admins only, this way I think you could open ctools to your players without impacting security.
Single use would be nice. For example: I give my player a book containing a command to give cash and when it's being clicked it runs the command and then disappears.