Class Tree

java.lang.Object
org.bukkit.material.MaterialData
org.bukkit.material.Tree
All Implemented Interfaces:
java.lang.Cloneable

public class Tree
extends MaterialData
Represents the different types of Trees.
  • Constructor Details

    • Tree

      public Tree()
    • Tree

      public Tree​(TreeSpecies species)
    • Tree

      public Tree​(TreeSpecies species, BlockFace dir)
    • Tree

      @Deprecated public Tree​(int type)
      Deprecated.
      Magic value
      Parameters:
      type - the raw type id
    • Tree

      public Tree​(Material type)
    • Tree

      @Deprecated public Tree​(int type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the raw type id
      data - the raw data value
    • Tree

      @Deprecated public Tree​(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • getSpecies

      public TreeSpecies getSpecies()
      Gets the current species of this tree
      Returns:
      TreeSpecies of this tree
    • setSpecies

      public void setSpecies​(TreeSpecies species)
      Sets the species of this tree
      Parameters:
      species - New species of this tree
    • getDirection

      public BlockFace getDirection()
      Get direction of the log
      Returns:
      one of:
      • BlockFace.TOP for upright (default)
      • BlockFace.NORTH (east-west)
      • BlockFace.WEST (north-south)
      • BlockFace.SELF (directionless)
    • setDirection

      public void setDirection​(BlockFace dir)
      Set direction of the log
      Parameters:
      dir - - direction of end of log (BlockFace.SELF for no direction)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class MaterialData
    • clone

      public Tree clone()
      Overrides:
      clone in class MaterialData