org.bukkit.material
Class Tree

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

public class Tree
extends MaterialData

Represents the different types of Trees.


Constructor Summary
Tree()
           
Tree(int type)
           
Tree(int type, byte data)
           
Tree(Material type)
           
Tree(Material type, byte data)
           
Tree(TreeSpecies species)
           
Tree(TreeSpecies species, BlockFace dir)
           
 
Method Summary
 Tree clone()
           
 BlockFace getDirection()
          Get direction of the log
 TreeSpecies getSpecies()
          Gets the current species of this tree
 void setDirection(BlockFace dir)
          Set direction of the log
 void setSpecies(TreeSpecies species)
          Sets the species of this tree
 String toString()
           
 
Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tree

public Tree()

Tree

public Tree(TreeSpecies species)

Tree

public Tree(TreeSpecies species,
            BlockFace dir)

Tree

public Tree(int type)

Tree

public Tree(Material type)

Tree

public Tree(int type,
            byte data)

Tree

public Tree(Material type,
            byte data)
Method Detail

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:
BlockFace.TOP for upright (default), BlockFace.NORTH (east-west), BlockFace.WEST (north-sout), 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 String toString()
Overrides:
toString in class MaterialData

clone

public Tree clone()
Overrides:
clone in class MaterialData


Copyright © 2013. All Rights Reserved.