类 EnchantmentOffer

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

public class EnchantmentOffer extends Object
本类描述了附魔台中可用的附魔选项.
  • 构造器详细资料

  • 方法详细资料

    • getEnchantment

      @NotNull public @NotNull Enchantment getEnchantment()
      获取魔咒/附魔种类.

      原文:Get the type of the enchantment.

      返回:
      魔咒种类
    • setEnchantment

      public void setEnchantment(@NotNull @NotNull Enchantment enchantment)
      设置魔咒/附魔种类.

      设置:Sets the type of the enchantment.

      参数:
      enchantment - 魔咒种类
    • getEnchantmentLevel

      public int getEnchantmentLevel()
      获取魔咒/附魔的等级.

      原文:Gets the level of the enchantment.

      返回:
      魔咒等级
    • setEnchantmentLevel

      public void setEnchantmentLevel(int enchantmentLevel)
      设置魔咒/附魔的等级.

      原文:Sets the level of the enchantment.

      参数:
      enchantmentLevel - 魔咒等级
    • getCost

      public int getCost()
      获取花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.

      原文:Gets the cost (minimum level) which is displayed as a number on the right hand side of the enchantment offer.

      返回:
      附魔花费的经验等级
    • 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.

      参数:
      cost - 附魔花费的经验等级