Package org.bukkit.entity
Enum Class Villager.Profession
- All Implemented Interfaces:
Serializable
,Comparable<Villager.Profession>
,Constable
,net.kyori.adventure.key.Keyed
,Translatable
,Keyed
- Enclosing interface:
- Villager
public static enum Villager.Profession
extends Enum<Villager.Profession>
implements Keyed, Translatable
Represents the various different Villager professions there may be.
Villagers have different trading options depending on their profession,
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionArmorer profession.Butcher profession.Cartographer profession.Cleric profession.Farmer profession.Fisherman profession.Fletcher profession.Leatherworker profession.Librarian profession.Mason profession.Nitwit profession.Sheperd profession.Toolsmith profession.Weaponsmith profession. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Return the namespaced identifier for this object.Gets the translation key.static Villager.Profession
Returns the enum constant of this class with the specified name.static Villager.Profession[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
ARMORER
Armorer profession. Wears a black apron. Armorers primarily trade for iron armor, chainmail armor, and sometimes diamond armor. -
BUTCHER
Butcher profession. Wears a white apron. Butchers primarily trade for raw and cooked food. -
CARTOGRAPHER
Cartographer profession. Wears a white robe. Cartographers primarily trade for explorer maps and some paper. -
CLERIC
Cleric profession. Wears a purple robe. Clerics primarily trade for rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone, and bottle o' enchanting. -
FARMER
Farmer profession. Wears a brown robe. Farmers primarily trade for food-related items. -
FISHERMAN
Fisherman profession. Wears a brown robe. Fisherman primarily trade for fish, as well as possibly selling string and/or coal. -
FLETCHER
Fletcher profession. Wears a brown robe. Fletchers primarily trade for string, bows, and arrows. -
LEATHERWORKER
Leatherworker profession. Wears a white apron. Leatherworkers primarily trade for leather, and leather armor, as well as saddles. -
LIBRARIAN
Librarian profession. Wears a white robe. Librarians primarily trade for paper, books, and enchanted books. -
MASON
Mason profession. -
NITWIT
Nitwit profession. Wears a green apron, cannot trade. Nitwit villagers do not do anything. They do not have any trades by default. -
SHEPHERD
Sheperd profession. Wears a brown robe. Shepherds primarily trade for wool items, and shears. -
TOOLSMITH
Toolsmith profession. Wears a black apron. Tool smiths primarily trade for iron and diamond tools. -
WEAPONSMITH
Weaponsmith profession. Wears a black apron. Weapon smiths primarily trade for iron and diamond weapons, sometimes enchanted.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object. -
translationKey
Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Specified by:
translationKey
in interfaceTranslatable
- Returns:
- the translation key
-