Anvil Help

Discussion in 'Plugin Development' started by MnMaxon, Nov 26, 2014.

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

    MnMaxon

    I am making an exploding pick plugin for someone. This was done by changing the name of the pick to Exploding Pick (in red). He wants to be able to combine the pick with other picks in anvils so the explosive pick can get more enchantments.
    I believed this was impossible due to the way MineCraft anvils work, and because there is no anvil event. The person I am making this for assures me that this is possible and he has seen it on other servers. Does anyone know of a way to do this?
     
  2. Offline

    Tecno_Wizard

    MnMaxon
    He is mistaken, as this is not possible with the current bukkit build.
     
    MnMaxon likes this.
  3. Offline

    mine-care

    Well I can imagine of a way but I cannot test it... Probably check for inventory click event and if the invnetory is anvil, and if the item clicked is a exploding pic, then put player in a array list, on inventory close or disconnect remove him and if he clicks again the anvil inv, check if he is in the arraylist and if he is check if the item is exploding pic, (you expect it not to be) so if it is not and it is of the same type as the exploding pic that means he has an lied it so you can turn the current pickaxe to a exploding one :)hope you understand.., I kinda typed it on a hury because it liturealy just popped in my mind
    Good luck
     
    ChipDev and MnMaxon like this.
  4. Offline

    MnMaxon

    mine-care
    Thanks, I fixed it a different way. I made it remove the name if you place an exploding pick in the first anvil slot (keeping the lore). I made the player unable to put it an exploding pick the second slot. When the player clicks the result slot, if the item has the exploding pick lore, it will give the item the exploding pick name.
     
  5. Offline

    mine-care

  6. Offline

    Tecno_Wizard

    mine-care, i was not thinking into the realm of trickery but yes, that works.
     
    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page