Class Leaves

All Implemented Interfaces:
Cloneable

@Deprecated(since="1.13", forRemoval=true) public class Leaves 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 leaf block that may be permanent or can decay when too far from a log.
See Also:
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    protected static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected static final Material
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Fields inherited from class org.bukkit.material.Wood Link icon

    DEFAULT_SPECIES
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block of the given type.
    Leaves(Material type, byte data)
    Deprecated.
    Magic value
    Leaves(Material type, TreeSpecies species)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block of the given type and tree species.
    Leaves(Material type, TreeSpecies species, boolean isDecayable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block of the given type and tree species and flag for whether this leaf block will disappear when too far from a log.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block of the given tree species.
    Leaves(TreeSpecies species, boolean isDecayable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a leaf block of the given tree species and flag for whether this leaf block will disappear when too far from a log.
  • Method Summary Link icon

    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 this leaf block is permanent or can decay when too far from a log
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if this leaf block is in the process of decaying
    void
    setDecayable(boolean isDecayable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set whether this leaf block will disappear when too far from a log
    void
    setDecaying(boolean isDecaying)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set whether this leaf block is in the process of decaying
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.bukkit.material.Wood Link icon

    getSpecies, setSpecies

    Methods inherited from class org.bukkit.material.MaterialData Link icon

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

    Methods inherited from class java.lang.Object Link icon

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details Link icon

    • DEFAULT_TYPE Link icon

      protected static final Material DEFAULT_TYPE
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_DECAYABLE Link icon

      protected static final boolean DEFAULT_DECAYABLE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details Link icon

    • Leaves Link icon

      public Leaves()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a leaf block.
    • Leaves Link icon

      public Leaves(TreeSpecies species)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a leaf block of the given tree species.
      Parameters:
      species - the species of the wood block
    • Leaves Link icon

      public Leaves(TreeSpecies species, boolean isDecayable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a leaf block of the given tree species and flag for whether this leaf block will disappear when too far from a log.
      Parameters:
      species - the species of the wood block
      isDecayable - whether the block is permanent or can disappear
    • Leaves Link icon

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

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

      public Leaves(Material type, TreeSpecies species, boolean isDecayable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a leaf block of the given type and tree species and flag for whether this leaf block will disappear when too far from a log.
      Parameters:
      type - the type of leaf block
      species - the species of the wood block
      isDecayable - whether the block is permanent or can disappear
    • Leaves Link icon

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

    • isDecaying Link icon

      public boolean isDecaying()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if this leaf block is in the process of decaying
      Returns:
      true if the leaf block is in the process of decaying
    • setDecaying Link icon

      public void setDecaying(boolean isDecaying)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set whether this leaf block is in the process of decaying
      Parameters:
      isDecaying - whether the block is decaying or not
    • isDecayable Link icon

      public boolean isDecayable()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if this leaf block is permanent or can decay when too far from a log
      Returns:
      true if the leaf block is permanent or can decay when too far from a log
    • setDecayable Link icon

      public void setDecayable(boolean isDecayable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set whether this leaf block will disappear when too far from a log
      Parameters:
      isDecayable - whether the block is permanent or can disappear
    • toString Link icon

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

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