# ItemAnimation

The first thing that you need before create the AnimatedItem is the Animation sheet. To create one, you need to create an ItemAnimation object. So, you have to write something like this:

```java
ItemAnimation itemAnimation = new ItemAnimation(0, true);
```

The first param is the object index, and the second is a bool that defines if you want to loop the animation. So, after having created the item, you can start to add some animation features. The API provides two types of features: The Timeout and the Block Replacement. Let's make an example:

```java
ItemAnimation itemAnimation = new ItemAnimation(0, true)
.addTimeout(1000) /* Add a timeout of 1000ms (1 second) */
/* Replace the block with the new GUItem but builded to ItemStack */
.addReplacecment(new GUItem(Material.BARRIER).buildToItemStack()); 
```
