Class ItemTexture


public final class ItemTexture extends ParticleTexture
An implementation of the ParticleTexture object to support item texture particles.
Since:
11.06.2019
Author:
ByteZ
See Also:
  • Constructor Details

    • ItemTexture

      public ItemTexture(org.bukkit.inventory.ItemStack itemStack)
      Initializes a new ParticleData object.
      Parameters:
      itemStack - the ItemStack which should be displayed by the particle.
  • Method Details

    • toNMSData

      public Object toNMSData()
      Converts the current ParticleData instance into nms data. If the current minecraft version was released before 1.13 an int array should be returned. If the version was released after 1.12 a nms ParticleParam has to be returned.
      Overrides:
      toNMSData in class ParticleTexture
      Returns:
      the nms data.
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack()
      Gets the ItemStack that will be displayed by the particle.
      Returns:
      the assigned ItemStack.
    • toNMSItemStack

      public static Object toNMSItemStack(org.bukkit.inventory.ItemStack itemStack)
      Gets the NMS ItemStack instance of a CraftItemSTack.
      Parameters:
      itemStack - the CraftItemStack
      Returns:
      the ItemStack instance of the specified CraftItemStack or null if either the given parameter is invalid or an error occurs.