⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Methods
  • Notes
  1. StarAPI (Spigot/Paper)
  2. Inventory Utilities

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

public static void addAniToInventory(Inventory inventory, Material[] animationMaterials, int amount, int slot, int animationSpeedTicks, String itemName, String... lore)

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 be null for no name.

  • lore: An optional array of strings representing the lore of the animated item.

updateAnimatedItem

private static void updateAnimatedItem(Inventory inventory, int slot, Material material, int amount, String itemName, String... lore)

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.

PreviousInventory UtilitiesNextBook Content

Last updated 1 year ago

🌟
📂
💎