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
ConstructorsConstructorDescriptionItemTexture(org.bukkit.inventory.ItemStack itemStack) Initializes a newParticleDataobject. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackGets theItemStackthat will be displayed by the particle.Converts the currentParticleDatainstance into nms data.static ObjecttoNMSItemStack(org.bukkit.inventory.ItemStack itemStack) Gets the NMS ItemStack instance of a CraftItemSTack.Methods inherited from class xyz.xenondevs.particle.data.texture.ParticleTexture
getData, getMaterialMethods inherited from class xyz.xenondevs.particle.data.ParticleData
getEffect, setEffect
-
Constructor Details
-
ItemTexture
public ItemTexture(org.bukkit.inventory.ItemStack itemStack) Initializes a newParticleDataobject.- Parameters:
itemStack- theItemStackwhich should be displayed by the particle.
-
-
Method Details
-
toNMSData
Converts the currentParticleDatainstance 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:
toNMSDatain classParticleTexture- Returns:
- the nms data.
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack()Gets theItemStackthat 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
nullif either the given parameter is invalid or an error occurs.
-