Using Custom Enchantments in Anvils [Help]

Discussion in 'Spigot Help' started by LegitzX, May 1, 2020.

  1. I have my custom enchantments finished, now I want to make it so a player can apply these custom enchantments using an anvil. For example, a player would put in a diamond sword in the first slot, and a haste custom enchantment[in book form] in the second slot, then in the third slot, it would apply that haste enchant on the sword for x amount of experience. Thanks!
  2. Moved to Spigot Development
  3. You could utilize the InventoryClickEvent and set the result if the user has certain items in the input slots. I don't believe there's a way to directly add a custom anvil recipe.
  4. Hmm, So basically I would check if the player has put in an armor piece and a custom enchantment, then if they do, set the result slot to the armor piece with the custom enchant applied? How would I make each custom enchantment need a certain amount of xp?