Enum Class TreeSpecies

java.lang.Object
java.lang.Enum<TreeSpecies>
ch.njol.skript.util.TreeSpecies
All Implemented Interfaces:
Serializable, Comparable<TreeSpecies>, Constable

public enum TreeSpecies extends Enum<TreeSpecies>
Repesents a grouping of Bukkkit TreeTypes
  • Enum Constant Details

  • Method Details

    • values

      public static TreeSpecies[] 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 TreeSpecies 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
    • grow

      public void grow(org.bukkit.Location location)
      Grow a tree at a location.

      If the species is a group, a random tree type is selected.

      Parameters:
      location - Location to grow the tree at
    • grow

      public void grow(org.bukkit.block.Block block)
      Grow a tree at a location.

      If the species is a group, a random tree type is selected.

      Parameters:
      block - Block to grow the tree at
    • getTypes

      public org.bukkit.TreeType[] getTypes()
      Get the TreeTypes that make up this species.
      Returns:
      TreeTypes that make up this species
    • is

      public boolean is(org.bukkit.TreeType type)
      Check if this species contains a specific tree type.
      Parameters:
      type - TreeType to check for
      Returns:
      True if the species contains the type, false otherwise