Package org.bukkit.entity
Enum Villager.Profession
- java.lang.Object
-
- java.lang.Enum<Villager.Profession>
-
- org.bukkit.entity.Villager.Profession
-
- All Implemented Interfaces:
Serializable
,Comparable<Villager.Profession>
- Enclosing interface:
- Villager
public static enum Villager.Profession extends Enum<Villager.Profession>
Represents the various different Villager professions there may be. Villagers have different trading options depending on their profession,
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Villager.Career>
getCareers()
Get an immutable list ofVillager.Career
belonging to this Profession.boolean
isZombie()
Deprecated.Unusedstatic Villager.Profession
valueOf(String name)
Returns the enum constant of this type with the specified name.static Villager.Profession[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL
@Deprecated public static final Villager.Profession NORMAL
Deprecated.UnusedNormal. Reserved for Zombies.
-
FARMER
public static final Villager.Profession FARMER
Farmer profession. Wears a brown robe.
-
LIBRARIAN
public static final Villager.Profession LIBRARIAN
Librarian profession. Wears a white robe.
-
PRIEST
public static final Villager.Profession PRIEST
Priest profession. Wears a purple robe.
-
BLACKSMITH
public static final Villager.Profession BLACKSMITH
Blacksmith profession. Wears a black apron.
-
BUTCHER
public static final Villager.Profession BUTCHER
Butcher profession. Wears a white apron.
-
NITWIT
public static final Villager.Profession NITWIT
Nitwit profession. Wears a green apron, cannot trade.
-
HUSK
@Deprecated public static final Villager.Profession HUSK
Deprecated.UnusedHusk. Reserved for Zombies
-
-
Method Detail
-
values
public static Villager.Profession[] 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.Profession c : Villager.Profession.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.Profession 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
-
isZombie
@Deprecated public boolean isZombie()
Deprecated.UnusedReturns if this profession can only be used by zombies.- Returns:
- zombie profession status
-
getCareers
@NotNull public List<Villager.Career> getCareers()
Get an immutable list ofVillager.Career
belonging to this Profession.- Returns:
- an immutable list of careers for this profession, or an empty map if this Profession has no careers.
-
-