Package org.bukkit.material
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 Summary
-
Method Summary
Modifier and Type Method Description Treeclone()BlockFacegetDirection()Get direction of the logTreeSpeciesgetSpecies()Gets the current species of this treevoidsetDirection(BlockFace dir)Set direction of the logvoidsetSpecies(TreeSpecies species)Sets the species of this treejava.lang.StringtoString()Methods inherited from class org.bukkit.material.MaterialData
equals, getData, getItemType, getItemTypeId, hashCode, setData, toItemStack, toItemStack
-
Constructor Details
-
Tree
public Tree() -
Tree
-
Tree
-
Tree
@Deprecated public Tree(int type)Deprecated.Magic value- Parameters:
type- the raw type id
-
Tree
-
Tree
@Deprecated public Tree(int type, byte data)Deprecated.Magic value- Parameters:
type- the raw type iddata- the raw data value
-
Tree
Deprecated.Magic value- Parameters:
type- the typedata- the raw data value
-
-
Method Details
-
getSpecies
Gets the current species of this tree- Returns:
- TreeSpecies of this tree
-
setSpecies
Sets the species of this tree- Parameters:
species- New species of this tree
-
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
Set direction of the log- Parameters:
dir- - direction of end of log (BlockFace.SELF for no direction)
-
toString
public java.lang.String toString()- Overrides:
toStringin classMaterialData
-
clone
- Overrides:
clonein classMaterialData
-