Class ItemTexture
java.lang.Object
xyz.xenondevs.particle.data.ParticleData
xyz.xenondevs.particle.data.texture.ParticleTexture
xyz.xenondevs.particle.data.texture.ItemTexture
An implementation of the
ParticleTexture
object to support item texture particles.- Since:
- 11.06.2019
- Author:
- ByteZ
- See Also:
-
Constructor Summary
ConstructorDescriptionItemTexture
(org.bukkit.inventory.ItemStack itemStack) Initializes a newParticleData
object. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStack
Gets theItemStack
that will be displayed by the particle.Converts the currentParticleData
instance into nms data.static Object
toNMSItemStack
(org.bukkit.inventory.ItemStack itemStack) Gets the NMS ItemStack instance of a CraftItemSTack.Methods inherited from class xyz.xenondevs.particle.data.texture.ParticleTexture
getData, getMaterial
Methods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
ItemTexture
public ItemTexture(org.bukkit.inventory.ItemStack itemStack) Initializes a newParticleData
object.- Parameters:
itemStack
- theItemStack
which should be displayed by the particle.
-
-
Method Details
-
toNMSData
Converts the currentParticleData
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 classParticleTexture
- Returns:
- the nms data.
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack()Gets theItemStack
that will be displayed by the particle.- Returns:
- the assigned
ItemStack
.
-
toNMSItemStack
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.
-