Package org.bukkit.entity
Enum Villager.Career
- java.lang.Object
-
- java.lang.Enum<Villager.Career>
-
- org.bukkit.entity.Villager.Career
-
- All Implemented Interfaces:
Serializable
,Comparable<Villager.Career>
- Enclosing interface:
- Villager
public static enum Villager.Career extends Enum<Villager.Career>
The Career of this Villager. EachVillager.Profession
has a set of careers it is applicable to. Each career dictates the trading options that are generated.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARMORER
Armorers primarily trade for iron armor, chainmail armor, and sometimes diamond armor.BUTCHER
Butchers primarily trade for raw and cooked food.CARTOGRAPHER
Cartographers primarily trade for explorer maps and some paper.CLERIC
Clerics primarily trade for rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone, and bottle o' enchanting.FARMER
Farmers primarily trade for food-related items.FISHERMAN
Fisherman primarily trade for fish, as well as possibly selling string and/or coal.FLETCHER
Fletchers primarily trade for string, bows, and arrows.LEATHERWORKER
Leatherworkers primarily trade for leather, and leather armor, as well as saddles.LIBRARIAN
Librarians primarily trade for paper, books, and enchanted books.NITWIT
Nitwit villagers do not do anything.SHEPHERD
Shepherds primarily trade for wool items, and shears.TOOL_SMITH
Tool smiths primarily trade for iron and diamond tools.WEAPON_SMITH
Weapon smiths primarily trade for iron and diamond weapons, sometimes enchanted.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<Villager.Career>
getCareers(Villager.Profession profession)
Get an immutable list ofVillager.Career
s that can be used with a givenVillager.Profession
Villager.Profession
getProfession()
Get theVillager.Profession
thisVillager.Career
belongs to.static Villager.Career
valueOf(String name)
Returns the enum constant of this type with the specified name.static Villager.Career[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
-
Method Detail
-
values
public static Villager.Career[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Villager.Career c : Villager.Career.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Villager.Career valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getProfession
public Villager.Profession getProfession()
Get theVillager.Profession
thisVillager.Career
belongs to.- Returns:
- the
Villager.Profession
.
-
getCareers
public static List<Villager.Career> getCareers(Villager.Profession profession)
Get an immutable list ofVillager.Career
s that can be used with a givenVillager.Profession
- Parameters:
profession
- the profession to get careers for- Returns:
- an immutable list of Careers that can be used by a profession, or an empty map if the profession was not found
-
-