Detecting if the bow is knocked

Discussion in 'Plugin Development' started by Murderscene, Sep 21, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Murderscene

    I want to be able to detect if the player has the bow in the knocked position or not.

    I have not been able to find a way to do this with bukkit events but I am sure there is a way to do it with detecting the packet that is sent.

    You can visually see when a player knocks a bow and even how far into the knock they are, so I know packets are being sent.

    Any help would be great :)

    Extra note:
    I cannot use playerInteract and just put a timer until when it would be knocked for the following reason: I would have detect the playerInteract event as the start of the bow-knock and the shootArrow as the end of the bow-knock. The problem here is that if the player right clicks and releases very quickly, no shootArrow event is called and my sever would think the player is still knocking.
     
  2. Offline

    Murderscene

    Would anyone atleast know the packet that is being sent when the player model is updated to the bow knocking position?
     
  3. Offline

    Muddr

  4. Offline

    Murderscene

    Thanks, I also found this shortly before you posted :). Unfortunately I have no idea how to tap into this packet. Is there anywhere that can show me how to make it call a method in my bukkit plugin when this packet is received?
     
Thread Status:
Not open for further replies.

Share This Page