程序包 org.bukkit.enchantments

# 类 EnchantmentOffer

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

public class EnchantmentOffer extends Object
本类描述了附魔台中可用的附魔选项.

- ## 构造器概要

  构造器
  构造器
  说明
  `EnchantmentOffer(@NotNull Enchantment enchantment, int enchantmentLevel, int cost)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `int`
  `getCost()`
  获取花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.
  `@NotNull Enchantment`
  `getEnchantment()`
  获取魔咒/附魔种类.
  `int`
  `getEnchantmentLevel()`
  获取魔咒/附魔的等级.
  `void`
  `setCost(int cost)`
  设置花费的经验等级(最低), 这个等级以数字形式显示在附魔台界面中附魔选项的右侧.
  `void`
  `setEnchantment(@NotNull Enchantment enchantment)`
  设置魔咒/附魔种类.
  `void`
  `setEnchantmentLevel(int enchantmentLevel)`
  设置魔咒/附魔的等级.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### EnchantmentOffer

    public EnchantmentOffer(@NotNull @NotNull Enchantment enchantment, int enchantmentLevel, int cost)

- ## 方法详细资料

  - ### 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` - 附魔花费的经验等级