Class EnchantmentOffer

java.lang.Object
org.bukkit.enchantments.EnchantmentOffer

public class EnchantmentOffer
extends Object
A class for the available enchantment offers in the enchantment table.
  • Constructor Details

  • Method Details

    • getEnchantment

      @NotNull public Enchantment getEnchantment()
      Get the type of the enchantment.
      Returns:
      type of enchantment
    • setEnchantment

      public void setEnchantment​(@NotNull Enchantment enchantment)
      Sets the type of the enchantment.
      Parameters:
      enchantment - type of the enchantment
    • getEnchantmentLevel

      public int getEnchantmentLevel()
      Gets the level of the enchantment.
      Returns:
      level of the enchantment
    • setEnchantmentLevel

      public void setEnchantmentLevel​(int enchantmentLevel)
      Sets the level of the enchantment.
      Parameters:
      enchantmentLevel - level of the enchantment
    • getCost

      public int getCost()
      Gets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.
      Returns:
      cost for this enchantment
    • setCost

      public void setCost​(int cost)
      Sets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.
      Parameters:
      cost - cost for this enchantment