Minecraft: Items scrolling though inventory
<p>Hey there people so I am making kind of like a CS:GO Cases plugin for a Minecraft and if you don't know what CS:GO cases are here is an explanation: So you will do a command(/common) and then it opens a common case, there is also going to be rare and legendary :) But when you execute the command, a inventory should open and items should start spinning and then slow down and eventually stop and the item in the middle is the item you win I have created a inventory I just have to figure out how to make the items spin. So I thought of loops, they are deffinetly the things I need. I tried to do:</p>

<pre><code>for(int x = 0; 0 &lt; 18; x++)`
{
   inv.setItem(x, diamondSword);
   inv.setItem(x, diamondShovel);
   inv.setItem(x, Chest);
   inv.setItem(x, Compass);
   inv.setItem(x, stick);
   inv.setItem(x, stonePickaxe);
   inv.setItem(x, diamond);
   inv.setItem(x, emerald);
}
</code></pre>

<p>And what happends is that the inventory opens and it is full with emerald(The last item) :/
So I tested and printed x in the server chat and when I do the command it makes all of the numbers appear instantly like:
1
2
3
4
5
... until it hits 17.</p>

<p>So I just want a little explanation on how I could make the items cycle through the GUI that appears when executing the command. If you know what I am talking about, please help :)</p>

<p>Thanks :D</p>