Class EnchantmentOffer
java.lang.Object
org.bukkit.enchantments.EnchantmentOffer
A class for the available enchantment offers in the enchantment table.
- Since:
- 1.11
-
Constructor Summary
ConstructorsConstructorDescriptionEnchantmentOffer(@NotNull Enchantment enchantment, int enchantmentLevel, int cost) -
Method Summary
Modifier and TypeMethodDescriptionintgetCost()Gets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.Get the type of the enchantment.intGets the level of the enchantment.voidsetCost(int cost) Sets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.voidsetEnchantment(@NotNull Enchantment enchantment) Sets the type of the enchantment.voidsetEnchantmentLevel(int enchantmentLevel) Sets the level of the enchantment.
-
Constructor Details
-
EnchantmentOffer
- Since:
- 1.11
-
-
Method Details
-
getEnchantment
Get the type of the enchantment.- Returns:
- type of enchantment
- Since:
- 1.11
-
setEnchantment
Sets the type of the enchantment.- Parameters:
enchantment- type of the enchantment- Since:
- 1.11
-
getEnchantmentLevel
public int getEnchantmentLevel()Gets the level of the enchantment.- Returns:
- level of the enchantment
- Since:
- 1.11
-
setEnchantmentLevel
public void setEnchantmentLevel(int enchantmentLevel) Sets the level of the enchantment.- Parameters:
enchantmentLevel- level of the enchantment- Since:
- 1.11
-
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
- Since:
- 1.11
-
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- Since:
- 1.11
-