Solved Detect when player is defending with sword?

Discussion in 'Plugin Development' started by ArthurMaker, Mar 15, 2014.

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

    ArthurMaker

    Is there any way to do it or create an event that makes it?
     
  2. Offline

    JungleSociety

    I'm not to sure if there is any way to directly check it, but you could check if the player is using right click with PlayerInteractEvent, then see if the item in their hand is a sword. Just a suggestion.
     
  3. Offline

    ShadowLAX

    ArthurMaker likes this.
  4. Offline

    ArthurMaker


    Thank you so much!
     
  5. Offline

    mickedplay

    ArthurMaker
    ShadowLAX
    JungleSociety

    Is it possible to cancel this?
    So, I mean a player cannot block when rightclicking.

    ##EDIT: Solved. Used PlayerInteractEvent & Action + e.setCancelled(true);
     
  6. Offline

    ArthurMaker


    Sure. Just use a scheduler.
     
Thread Status:
Not open for further replies.

Share This Page