Solved Detect Cause of Player Movement

Discussion in 'Plugin Development' started by krazytraynz, Aug 8, 2014.

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

    krazytraynz

    When PlayerMoveEvent calls, I want to make sure it was only called because a Player moved on their own, not because of knockback from another entity, riding a minecart, etc. Is there any way to do this, or am I out of luck?
     
  2. Offline

    Forseth11

    krazytraynz I am 90% sure that there is no legit way or I have just never seen it. If you need to you could use every event that could possible cause a player to move and check if it is occurring near the players location then set a long as the last time in milliseconds that it happened by the player then in the move event you can check those times based on the current time.
     
  3. Offline

    krazytraynz

    Forseth11
    I figured as much, thanks :p I've sort of already tried your method with EntityDamageByEntityEvent, and it doesn't work although I feel like it should - anything I should change?

    EDIT: I think I have it working now. Thanks for the advice!
     
Thread Status:
Not open for further replies.

Share This Page