Solved Adding Enchants

Discussion in 'Plugin Development' started by Lime2020_YT, Aug 9, 2017.

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

    Lime2020_YT

    I am so Sorry

    I just took the wrong import
    I'm so sorry that i used your time SORRY
     
    Last edited: Aug 11, 2017
  2. Offline

    Zombie_Striker

  3. Offline

    yPedx

    @Lime2020_YT
    Try:
    Code:
    stickm.addEnchant(Enchantment.KNOCKBACK, 2, true);
     
  4. @Lime2020_YT

    Instead of using the enchant function from ItemMeta class, try do it directly from the ItemStack class.

    Code:
    ItemStack stickm = new ItemStack(Material.STICK);
    stickm.addUnsafeEnchantment(Enchantment.KNOCKBACK, 2);
     
Thread Status:
Not open for further replies.

Share This Page