Resource (Class) Simple ArmorStand Animation

Discussion in 'Spigot Plugin Development' started by chris_, May 27, 2017.

  1. Hello SpigotMC!
    My name is Chris and the first time I tried Hypixels new game BedWars, they had made the diamond and emerald generators with spinning blocks, I liked the idea and wanted to attempt to recreate them. These spinning blocks are obviously armorstands wearing diamond- and emerald blocks as helmets and having their locations changed.

    I decided to recreate these things and so I started working on a class, and now it's finished! ( actually it was finished a few weeks ago x) )

    This can be useful for either mini-games, as powerups or generators and it's also useful for developers who wants to understand basic armorstand "animations".

    The class


    Usage
    First you need to put FloatingItem.enable(this/your plugin); in your onEnable method.
    Then simply create a new FloatingItem by doing
    FloatingItem example = new FloatingItem(location); .
    Lastly you just spawn it in using the display method. The display method has 3 parameters, the itemstack, whether it should be big or not and the text, if you want text above the floatingitem.

    You can delete the floatingitem or all floating items by using
    delete or the static deleteAll method.
     
    • Like Like x 2
    • Useful Useful x 1
    • Creative Creative x 1
  2. no replies? :(
     
    • Agree Agree x 1
  3. Ill reply for you buddy. Good job on this, Im sure it will be useful to some ! :)
     
  4. Sounds great, but the title was a tad misleading. When I saw "animations" I thought you could actually make the items move without setting up a scheduler yourself etc. Maybe try adding that?
     
  5. i gotta clickbait to get those replies.

    And what do you mean? XD
     
  6. Would rate your reply something good but I'm banned from rating stuff xD
     
  7. How did you manage that? lol
     
  8. I wanted to get 420 likes "given", so I liked a bunch of stuff.

    : ]
     
    • Like Like x 4