Another plugin request! Plugin category: Mechanics Suggested name: ItemCommander What I want: I would like a plugin, which makes it possible to execute commands with items. (configurable). Like if you had a clock, and you right-clicked it, it would do the command /time set day. Or tp. Or other commands. A config like: itemnumber: command Ideas for commands: None, this is to get rid of commands Ideas for permissions: itemcommand.use When I'd like it by: As soon as possible. I know there's a plugin like this, but it isn't updated, and I can't get it to work!
CraftBook can already do this with its CommandItems feature Edit: plus, you can even create them ingame if the config is too daunting. For more info you can check the craftbook wiki.
I'll try that. But a standalone plugin would be nice, so I hope bartboy8 will make this for me anyways.
Just so you're aware, Craftbook can have almost all features disabled if you wanted and it's also a lightweight plugin even with everything left on. I understand wanting a standalone plugin but also be aware that there are also other plugins that have your feature with additions such as cooldowns, costs and bind to any item. If you wanted, you could use custom crafting in craftbook and craft a custom named item that is bound with the command you want. In addition, other plugins do this exact function too. Magicspells, Skript and VariableTriggers can all bind a command to an item and apply a cooldown. I recommend you look at those plugins because they're all lightweight and easy to use. Aside from that though, not trying to stop bartboy8 from coding the plugin. Good luck.
Threw together something quick. Up to you if you use it or not https://dl.dropboxusercontent.com/u/13819323/cmd.jar Bug : you can't use it in the air, only on blocks. code is pretty messy if you can even call hardcoding "coding". never actually read a java book before, only learnt from my mistakes Code:java import org.bukkit.Material;import org.bukkit.configuration.file.FileConfiguration;import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.block.Action;import org.bukkit.event.player.PlayerInteractEvent;import org.bukkit.plugin.java.JavaPlugin; public class CMD extends JavaPlugin implements Listener{ public void onEnable() {getServer().getPluginManager().registerEvents(this, this);FileConfiguration config = getConfig();/*****************************************************/config.addDefault("Item1.Boolean", false);config.addDefault("Item1.Material", "AIR");config.addDefault("Item1.Permission", "Cmd.1");config.addDefault("Item1.Command1", "/Command");/*****************************************************/config.addDefault("Item2.Boolean", false);config.addDefault("Item2.Material", "AIR");config.addDefault("Item2.Permission", "Cmd.1");config.addDefault("Item2.Command1", "/Command");/*****************************************************/config.addDefault("Item3.Boolean", false);config.addDefault("Item3.Material", "AIR");config.addDefault("Item3.Permission", "Cmd.1");config.addDefault("Item3.Command1", "/Command");/*****************************************************/config.addDefault("Item4.Boolean", false);config.addDefault("Item4.Material", "AIR");config.addDefault("Item4.Permission", "Cmd.1");config.addDefault("Item4.Command1", "/Command");/*****************************************************/config.addDefault("Item5.Boolean", false);config.addDefault("Item5.Material", "AIR");config.addDefault("Item5.Permission", "Cmd.1");config.addDefault("Item5.Command1", "/Command");/*****************************************************/config.options().copyDefaults(true);saveConfig();}@EventHandlerpublic void PlayerInteract(PlayerInteractEvent event) {FileConfiguration config = getConfig();final Player p = event.getPlayer();boolean ClickBlock = event.getAction().equals(Action.RIGHT_CLICK_BLOCK);boolean ClickAir = event.getAction().equals(Action.RIGHT_CLICK_AIR);/*****************************************************/if(p.hasPermission(config.getString("Item1.Permission")) && ClickAir || ClickBlock && config.getBoolean("Item1.Boolean")==true){if (p.getItemInHand().getType().equals(Material.getMaterial(config.getString("Item1.Material")))){p.chat(config.getString("Item1.Command1"));} }/*****************************************************/if(p.hasPermission(config.getString("Item2.Permission")) && ClickAir || ClickBlock && config.getBoolean("Item2.Boolean")==true){if (p.getItemInHand().getType().equals(Material.getMaterial(config.getString("Item2.Material")))){p.chat(config.getString("Item2.Command1"));} }/*****************************************************/if(p.hasPermission(config.getString("Item3.Permission")) && ClickAir || ClickBlock && config.getBoolean("Item3.Boolean")==true){if (p.getItemInHand().getType().equals(Material.getMaterial(config.getString("Item3.Material")))){p.chat(config.getString("Item3.Command1"));} }/*****************************************************/if(p.hasPermission(config.getString("Item4.Permission")) && ClickAir || ClickBlock && config.getBoolean("Item4.Boolean")==true){if (p.getItemInHand().getType().equals(Material.getMaterial(config.getString("Item4.Material")))){p.chat(config.getString("Item4.Command1"));} }/*****************************************************/if(p.hasPermission(config.getString("Item5.Permission")) && ClickAir || ClickBlock && config.getBoolean("Item5.Boolean")==true){if (p.getItemInHand().getType().equals(Material.getMaterial(config.getString("Item5.Material")))){p.chat(config.getString("Item5.Command1"));} }/*****************************************************/config.options().copyDefaults(true);saveConfig();} } Item names that can be used are found here http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html