Solved Detecting right click on NMS ArmorStand

Discussion in 'Spigot Plugin Development' started by Il_totore, Sep 8, 2018.

  1. Hello,

    Knowing that spigot events are not triggered on NMS entities, I need to know how to detect a right click on an armorstand generated through packets without API/LIB !!!

    Thank =D, Il_totore.
     
  2. The client can't tell the difference and will still send the Use Entity packet which you have to listen for and then check if the entity id of an incoming packet is equal to the entity id of one of your armorstands.
    If you are definitely insisting on reinventing the wheel by doing it without ProtocolLib, go for it, maybe you can find a tutorial on how to listen for packets on Google. You need to watch out as doing this by yourself can cause a lot of problems like breaking compatibility with other plugins also trying to listen for packets.

    I would still recommend you to use ProtocolLib as it doesn't only speed up development time by huge factors, it has also solved the common issues with modifying Minecrafts network code by yourself..
     
  3. If adding something to the connections pipeline breaks compatibility then those plugins are doing something wrong, not you.
     

  4. That's what I did but it detects several packages but not the PacketPlayInUseEntity