Looking for a plugin for repairing items with a consumable item

Discussion in 'Spigot Plugin Help' started by 10kk, Oct 17, 2018.

  1. To put it simply, does anyone know a plugin which can be used to repair a players item via a consumable item in-game?
    At first I thought CommandToItem may work with essentials' /fix, but you can't hold an item while using a consumable, or it just tries to /fix the consumable or the empty hand.
     
  2. how would u want to specify which item it is?
     
  3. For example, clicking an eye of ender and making it repair the next item I right click (such as a tool)
    Some plugins do this sort of thing, like mythicdrops putting sockets in socket slots on items.
     
  4. You're probably going to want to create a List that listens for when you interact with your next item, add them to that list as they click an eye of ender.

    PlayerInteractEvent

    if (event.getItemRightClicked().getType().equals(Material.EYE_OF_ENDER)) {
    arraylist.add(user);
    //add removal code of the item setAmount(getAmount-1)
    }

    if (arraylist.has(user)) {//means they interacted with eye of ender
    check for item they interacted with this time if its repairable
    }
     
    #4 Kozs, Oct 17, 2018
    Last edited: Oct 17, 2018