Enum Class O2WandWoodType

java.lang.Object
java.lang.Enum<O2WandWoodType>
net.pottercraft.ollivanders2.item.wand.O2WandWoodType
All Implemented Interfaces:
Serializable, Comparable<O2WandWoodType>, Constable

public enum O2WandWoodType extends Enum<O2WandWoodType>
Wand wood types
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static O2WandWoodType[] 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

      public static O2WandWoodType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getMaterial

      @NotNull public @NotNull org.bukkit.Material getMaterial()
      Get the material for this type
      Returns:
      the material
    • getLabel

      @NotNull public @NotNull String 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

      @NotNull public static @NotNull ArrayList<String> getAllWandWoodsByName()
      Get a list of all the wand wood types by name.
      Returns:
      the names of all wand woods as a list
    • getRandomWood

      @NotNull public static @NotNull String getRandomWood()
      Get a random wand wood by name
      Returns:
      a random wand wood name
    • getWandWoodBySeed

      public static String getWandWoodBySeed(int seed)
      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