Class Sapling

All Implemented Interfaces:
Cloneable

@Deprecated(since="1.13", forRemoval=true) public class Sapling extends Wood
Deprecated, for removal: This API element is subject to removal in a future version.
all usage of MaterialData is deprecated and subject to removal. Use BlockData.
Represents the different types of Tree block that face a direction.
See Also:
  • Field Summary

    Fields inherited from class org.bukkit.material.Wood

    DEFAULT_SPECIES, DEFAULT_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling of the given type.
    Sapling(Material type, byte data)
    Deprecated.
    Magic value
    Sapling(Material type, TreeSpecies species)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling of the given type and tree species.
    Sapling(Material type, TreeSpecies species, boolean isInstantGrowable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling of the given type and tree species and if is it instant growable
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling of the given tree species.
    Sapling(TreeSpecies species, boolean isInstantGrowable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a sapling of the given tree species and if is it instant growable
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the Sapling would grow when next ticked with bonemeal
    void
    setIsInstantGrowable(boolean isInstantGrowable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set whether this sapling will grow when next ticked with bonemeal
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.Wood

    getSpecies, setSpecies

    Methods inherited from class org.bukkit.material.MaterialData

    equals, getData, getItemType, hashCode, setData, toItemStack, toItemStack

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Sapling

      public Sapling()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling.
    • Sapling

      public Sapling(TreeSpecies species)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling of the given tree species.
      Parameters:
      species - the species of the sapling
    • Sapling

      public Sapling(TreeSpecies species, boolean isInstantGrowable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling of the given tree species and if is it instant growable
      Parameters:
      species - the species of the tree block
      isInstantGrowable - true if the Sapling should grow when next ticked with bonemeal
    • Sapling

      public Sapling(Material type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling of the given type.
      Parameters:
      type - the type of tree block
    • Sapling

      public Sapling(Material type, TreeSpecies species)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling of the given type and tree species.
      Parameters:
      type - the type of sapling
      species - the species of the sapling
    • Sapling

      public Sapling(Material type, TreeSpecies species, boolean isInstantGrowable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a sapling of the given type and tree species and if is it instant growable
      Parameters:
      type - the type of sapling
      species - the species of the sapling
      isInstantGrowable - true if the Sapling should grow when next ticked with bonemeal
    • Sapling

      @Deprecated(since="1.9") public Sapling(Material type, byte data)
      Deprecated.
      Magic value
      Parameters:
      type - the type
      data - the raw data value
  • Method Details

    • isInstantGrowable

      public boolean isInstantGrowable()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if the Sapling would grow when next ticked with bonemeal
      Returns:
      true if the Sapling would grow when next ticked with bonemeal
    • setIsInstantGrowable

      public void setIsInstantGrowable(boolean isInstantGrowable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set whether this sapling will grow when next ticked with bonemeal
      Parameters:
      isInstantGrowable - true if the Sapling should grow when next ticked with bonemeal
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Wood
    • clone

      public Sapling clone()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      clone in class Wood