Package org.bukkit.entity
Interface Villager.Profession
- All Superinterfaces:
Comparable<Villager.Profession>
,Keyed
,Keyed
,OldEnum<Villager.Profession>
,Translatable
- Enclosing interface:
Villager
public static interface Villager.Profession
extends OldEnum<Villager.Profession>, Keyed, Translatable
Represents the various different Villager professions there may be.
Villagers have different trading options depending on their profession,
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Villager.Profession
Armorer profession.static final Villager.Profession
Butcher profession.static final Villager.Profession
Cartographer profession.static final Villager.Profession
Cleric profession.static final Villager.Profession
Farmer profession.static final Villager.Profession
Fisherman profession.static final Villager.Profession
Fletcher profession.static final Villager.Profession
Leatherworker profession.static final Villager.Profession
Librarian profession.static final Villager.Profession
Mason profession.static final Villager.Profession
Nitwit profession.static final Villager.Profession
static final Villager.Profession
Shepherd profession.static final Villager.Profession
Toolsmith profession.static final Villager.Profession
Weaponsmith profession. -
Method Summary
Modifier and TypeMethodDescriptionGets the translation key.static @NotNull Villager.Profession
Deprecated, for removal: This API element is subject to removal in a future version.static @NotNull Villager.Profession[]
values()
Deprecated, for removal: This API element is subject to removal in a future version.useIterable.iterator()
.
-
Field 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
Shepherd 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
-
valueOf
@NotNull @Deprecated(since="1.21", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Villager.Profession valueOf(@NotNull @NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead.- Parameters:
name
- of the villager profession.- Returns:
- the villager profession with the given name.
-
values
@NotNull @Deprecated(since="1.21", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Villager.Profession[] values()Deprecated, for removal: This API element is subject to removal in a future version.useIterable.iterator()
.- Returns:
- an array of all known villager professions.
-
translationKey
Description copied from interface:net.kyori.adventure.translation.Translatable
Gets the translation key.- Specified by:
translationKey
in interfaceTranslatable
- Returns:
- the translation key
-
Registry.get(NamespacedKey)
instead.