Enum Class O2WandWoodType
- All Implemented Interfaces:
Serializable,Comparable<O2WandWoodType>,Constable
Wand wood types
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionGet a list of all the wand wood types by name.@NotNull StringgetLabel()Get the label for this type@NotNull org.bukkit.MaterialGet the material for this typestatic @NotNull StringGet a random wand wood by namestatic StringgetWandWoodBySeed(int seed) Get a player's destined wand wood by seed.static @Nullable O2WandWoodTypegetWandWoodTypeByMaterial(@NotNull org.bukkit.Material m) Get the wand wood type for this material.static @Nullable O2WandWoodTypegetWandWoodTypeByName(@NotNull String name) Get the wand wood type matching the given name.static booleanisWandWood(org.bukkit.Material material) Is this ItemStack a wand wood?static O2WandWoodTypeReturns the enum constant of this class with the specified name.static O2WandWoodType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ACACIA
Acacia -
BIRCH
Birch -
CHERRY
Cherry -
OAK
Oak -
SPRUCE
Spruce
-
-
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
-
getMaterial
@NotNull public @NotNull org.bukkit.Material getMaterial()Get the material for this type- Returns:
- the material
-
getLabel
Get the label for this type- Returns:
- the label
-
getWandWoodTypeByMaterial
@Nullable public static @Nullable O2WandWoodType getWandWoodTypeByMaterial(@NotNull @NotNull org.bukkit.Material m) Get the wand wood type for this material.- Parameters:
m- the material to check- Returns:
- the wand wood type if found, null otherwise
-
getWandWoodTypeByName
@Nullable public static @Nullable O2WandWoodType getWandWoodTypeByName(@NotNull @NotNull String name) Get the wand wood type matching the given name.Name comparison is case-sensitive using
String.equals(Object).- Parameters:
name- the name to look up- Returns:
- the wand wood type if found, null otherwise
-
getAllWandWoodsByName
Get a list of all the wand wood types by name.- Returns:
- the names of all wand woods as a list
-
getRandomWood
Get a random wand wood by name- Returns:
- a random wand wood name
-
getWandWoodBySeed
Get a player's destined wand wood by seed.- Parameters:
seed- the seed to determine their destined wood- Returns:
- the wand wood name
-
isWandWood
public static boolean isWandWood(org.bukkit.Material material) Is this ItemStack a wand wood?- Parameters:
material- the ItemStack to check- Returns:
- true if it is a wand wood, false otherwise
-