Is anything wrong with PacketPlayOutAnimation?

Discussion in 'Spigot Plugin Development' started by Vert3x, May 1, 2017.

  1. Hello, this is such a quick question; since I'm creating a plugin I'm gonna post, I would like to know if there is anything wrong around PacketPlayOutAnimation, because I used it and noticed that it is working fine but no other plugin uses it. Is there anything I should know about it? Is it kind of unstable?
    What I basically did was making the players animate once interacting (they wouldn't do themselves) and swing their arm like in vanilla interactions. I just send it to all the players and before, when I use its constructor, I just put an nms instance of the player I want to animate as the first Entity parameter and a 0 for the main arm swinging or a 3 for the off arm swinging as second int parameter. I'm saying this because it's much easy and it sounds pretty strange to me that nobody else has ever used it so far. Perhaps I just didn't notice it?
     
  2. That's pretty presumptuous. You know all plugins? You know how all plugins work in detail? You decompiled all plugins?
    I guess this is more likely.
    Furthermore this packet might be a very strange usecase. I can't imagine where you would actually need it or where it actually might be useful.
    It triggeres entity animations... well most animations (e.g. when moving / teleporting / interacting / hitting / ...) either were clientside or already send by the server. So when ever would you need it???

    Nope. You should be safe, when using it like:
     
  3. You're right. I meant as far as I could see.
    Right clicking an iron door doesn't obviously do anymore the arm swing animation because it was useless for vanilla, but for my plugin allowing to open them through a simple right click this packet makes the effect better looking. It's not actually useful, it's just a graphical effect I added as option.
    Anyways, thank you for the reply,
    I'll wait for some more confirmations.