Animated Items
Create animated items in guis easier
Overview
The AnimatedItems
class provides utility methods for adding animated items to inventories in a Minecraft Bukkit server environment. It allows developers to create items that change appearance over time, creating visual effects or dynamic elements in inventories.
Methods
addAniToInventory
addAniToInventory
Adds an animated item to the specified inventory with the provided properties.
Parameters
inventory
: The inventory to add the animated item to.animationMaterials
: An array of materials representing the frames of the animation.amount
: The amount of the item to add to the inventory.slot
: The slot in the inventory where the item should be placed. If negative, the item will be added to the inventory normally.animationSpeedTicks
: The speed of the animation, in server ticks.itemName
: The display name of the animated item. Can benull
for no name.lore
: An optional array of strings representing the lore of the animated item.
updateAnimatedItem
updateAnimatedItem
Updates an existing animated item in the specified inventory with new properties.
Parameters
inventory
: The inventory containing the animated item to be updated.slot
: The slot in the inventory where the item is located.material
: The new material of the animated item.amount
: The new amount of the item.itemName
: The new display name of the animated item.lore
: An optional array of strings representing the new lore of the animated item.
Notes
The
AnimatedItems
class allows for the creation of dynamic and visually appealing inventory items that change appearance over time.Developers can use the
addAniToInventory
method to add animated items to inventories, specifying the animation frames, speed, and other properties.The
updateAnimatedItem
method can be used to modify existing animated items in inventories with new properties, enabling dynamic updates and changes during gameplay.
Last updated