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?
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
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.