枚举 Villager.Career

java.lang.Object
java.lang.Enum<Villager.Career>
org.bukkit.entity.Villager.Career
所有已实现的接口:
Serializable, Comparable<Villager.Career>, java.lang.constant.Constable
封闭接口:
Villager

public static enum Villager.Career extends Enum<Villager.Career>
The Career of this Villager. Each Villager.Profession has a set of careers it is applicable to. Each career dictates the trading options that are generated.
  • 枚举常量详细资料

    • FARMER

      public static final Villager.Career FARMER
      Farmers primarily trade for food-related items.
    • FISHERMAN

      public static final Villager.Career FISHERMAN
      Fisherman primarily trade for fish, as well as possibly selling string and/or coal.
    • SHEPHERD

      public static final Villager.Career SHEPHERD
      Shepherds primarily trade for wool items, and shears.
    • FLETCHER

      public static final Villager.Career FLETCHER
      Fletchers primarily trade for string, bows, and arrows.
    • LIBRARIAN

      public static final Villager.Career LIBRARIAN
      Librarians primarily trade for paper, books, and enchanted books.
    • CARTOGRAPHER

      public static final Villager.Career CARTOGRAPHER
      Cartographers primarily trade for explorer maps and some paper.
    • CLERIC

      public static final Villager.Career CLERIC
      Clerics primarily trade for rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone, and bottle o' enchanting.
    • ARMORER

      public static final Villager.Career ARMORER
      Armorers primarily trade for iron armor, chainmail armor, and sometimes diamond armor.
    • WEAPON_SMITH

      public static final Villager.Career WEAPON_SMITH
      Weapon smiths primarily trade for iron and diamond weapons, sometimes enchanted.
    • TOOL_SMITH

      public static final Villager.Career TOOL_SMITH
      Tool smiths primarily trade for iron and diamond tools.
    • BUTCHER

      public static final Villager.Career BUTCHER
      Butchers primarily trade for raw and cooked food.
    • LEATHERWORKER

      public static final Villager.Career LEATHERWORKER
      Leatherworkers primarily trade for leather, and leather armor, as well as saddles.
    • NITWIT

      public static final Villager.Career NITWIT
      Nitwit villagers do not do anything. They do not have any trades by default.
  • 方法详细资料

    • values

      public static Villager.Career[] values()
      按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
      返回:
      按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
    • valueOf

      public static Villager.Career valueOf(String name)
      返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • getProfession

      public Villager.Profession getProfession()
      Get the Villager.Profession this Villager.Career belongs to.
      返回:
      the Villager.Profession.
    • getCareers

      public static List<Villager.Career> getCareers(Villager.Profession profession)
      Get an immutable list of Villager.Careers that can be used with a given Villager.Profession
      参数:
      profession - the profession to get careers for
      返回:
      an immutable list of Careers that can be used by a profession, or an empty map if the profession was not found