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 Tree
clone()
BlockFace
getDirection()
Get direction of the logTreeSpecies
getSpecies()
Gets the current species of this treevoid
setDirection(BlockFace dir)
Set direction of the logvoid
setSpecies(TreeSpecies species)
Sets the species of this treejava.lang.String
toString()
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:
toString
in classMaterialData
-
clone
- Overrides:
clone
in classMaterialData
-