Right click pickaxe to execute command

Discussion in 'Plugin Requests' started by Amandusjf, Nov 25, 2020.

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

    Amandusjf

    Plugin category: Prison

    Minecraft version: 1.16.4

    Suggested name: RightClickCommand


    What I want:
    A plugin where you can right click a enchanted diamond pickaxe and it will execute a command set in a config.yml

    If its possible and easy, it would be nice to have a thing in the config where you could set the specified item to work with a specified command. and you could have multiple items set to a command or multiple commands set to a item.

    What i need is any enchanted diamond pickaxe to work. This is for my prison server where players can right click their pickaxe to open a menu i made with deluxe menus. So the diamond pickaxe have got all different enchants

    Ideas for commands:
    /rcc reload (reloads the plugin)

    Ideas for permissions:
    rightclickcommand.reload (permission for reloading the plugin)

    When I'd like it by: As soon as possible
     
    Last edited: Nov 25, 2020
  2. Offline

    Benlewis9000

    You may want to be a little more specific; is this any enchanted pickaxe (or type of item), or one in particular with certain metadata?
     
  3. Offline

    Amandusjf

    What i need is any enchanted diamond pickaxe to work. This is for my prison server where players can right click their pickaxe to open a menu i made with deluxe menus. So the diamond pickaxe have got all different enchants
    (Didnt mean to post this as a reply)

    @gochi9 This is working as u said but every time i right click the pickaxe it does the command i set it to do but it also says
    1
    2
    3
    4
    in the chat.
    and when i right-click anything else that dosent have a command. it does
    1
    2
     

    Attached Files:

    Last edited: Nov 26, 2020
    Benlewis9000 likes this.
  4. Offline

    gochi9

    Yes i would also like to know this
     
  5. Offline

    Benlewis9000

    Ok that makes sense, I can have a stab tomorrow if no one else beats me to it.
     
  6. Offline

    Nichrock1

    Amandusjf likes this.
  7. Offline

    gochi9

    This is the plugin

    Command: /rccreload - Permission: rightclickcommand.reloadconfig

    You can add as many items and commands as you like,you can also make it check if the item needs to be enchanted or not.
     
    Amandusjf and Benlewis9000 like this.
  8. Offline

    Amandusjf

    @gochi9
    This worked but it didnt work with commands with one word. so i couldnt do just "upgrade" , i hade to do "dm open upgrade". this is not rly a prob for me but it could be a prob for someone else tho
     
  9. Offline

    Nichrock1

    Not sure what you mean? It works with one word commands for me. Make sure you have the full command inside quotation marks.

    For example, if i do "clear", it would clear my inventory.
     
  10. Offline

    gochi9

    Oh i forgot some debug stuff in there. This is the plugin
     
  11. Offline

    Amandusjf

    @Nichrock1 or @gochi9 could u mby add a toggle feature to this? I have bedrock users aswell on my server and right click is different for them so i want the to be able to toggle bc it can get really annoying for them when their mining. Bscly just a command to toggle it and a permission to go with it.
     
    Last edited: Nov 27, 2020
Thread Status:
Not open for further replies.

Share This Page