Package org.bukkit.enchantments
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 Summary
Constructors Constructor Description EnchantmentOffer(Enchantment enchantment, int enchantmentLevel, int cost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCost()Gets the cost in experience levels the player has to pay to enchant his item with this enchantment.EnchantmentgetEnchantment()Get the type of the enchantment.intgetEnchantmentLevel()Gets the level of the enchantment.voidsetCost(int cost)Sets the cost in experience levels the player has to pay to enchant his item with this enchantmentvoidsetEnchantment(Enchantment enchantment)Sets the type of the enchantment.voidsetEnchantmentLevel(int enchantmentLevel)Sets the level of the enchantment.
-
-
-
Constructor Detail
-
EnchantmentOffer
public EnchantmentOffer(Enchantment enchantment, int enchantmentLevel, int cost)
-
-
Method Detail
-
getEnchantment
public Enchantment getEnchantment()
Get the type of the enchantment.- Returns:
- type of enchantment
-
setEnchantment
public void setEnchantment(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 in experience levels the player has to pay to enchant his item with this enchantment.- Returns:
- cost for this enchantment
-
setCost
public void setCost(int cost)
Sets the cost in experience levels the player has to pay to enchant his item with this enchantment- Parameters:
cost- cost for this enchantment
-
-