Filled Right-Click with an item, executes command by console.

Discussion in 'Plugin Requests' started by Blue_Monkey246, Jan 16, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Blue_Monkey246

    I someone to direct me a link to a plugin (Or make one) where as if a certain item was clicked, certain command(s) would be executed. As I know nothing about coding a plugin myself, I figured this one wouldn't be hard for someone else to do. Also, I've looked "everywhere" for a plugin like this... but most are outdated or aren't exactly what I'm looking for. I'd expect the config to look something like this:

    ################
    ##SingleClickItems##
    ## ITEMS ##
    ################

    exampleitem:
    name: 'Example Item'
    lore: 'Example Item Lore Line One'
    lore2:'Example Item Lore Line Two'
    id: 'stick' #Could also be subsituted with an ID of 280
    executedbyplayer: false
    command: 'give %player% minecraft:diamond 64'
    onrightclick: true
    onleftclick: true

    exampleitem2:
    name: 'Example Item Two'
    lore: 'Example Item Two Lore Line One'
    lore2:'Example Item Two Lore Line Two'
    id: 'diamond_sword' #Could also be subsituted with an ID of 276
    executedbyplayer: false
    command: 'give %player% minecraft:gold 64'
    onrightclick: true
    onleftclick: true





    Suggested Plugin Name:
    SingleClickItems

    Command Ideas:
    /sci set [command] Sets a command to your currently held item added as
    /sci remove Removes all commands from the held item's ID in the config

    Permission Ideas:
    singleclickitems.use.set Ability to use "/sci set[command]"
    singleclickitems.use.remove Ability to use "/sci remove"
    singleclickitems.item.exampleitem Ability to use the item

    The item would also be removed from the players inventory after use...



    EDIT: This plugin is exactly what I'm looking for, but how do I use the placeholder "c:" to run the command as console? https://www.spigotmc.org/resources/item-to-command.9246/



    EDIT 2: Found EXACTLY what I was looking for! It's called CraftBook, they have a feature called CommandItems which allows the user to set specific commands to an item and run them as console... http://dev.bukkit.org/bukkit-plugins/craftbook/ Also I am not sure how to close a thread, so if a Mod would like to do so, that would be great!
     
    Last edited: Jan 17, 2016
  2. Offline

    Blue_Monkey246

    [Answer Solved By User] --Read End Of Thread
     
Thread Status:
Not open for further replies.

Share This Page