there's a way for ignore if a player moves but caused by an entity? (+1.9)

Discussion in 'Spigot Plugin Development' started by HotDoctor, May 27, 2019.

  1. Hey there,

    I'm making a afk plugin and I have everything ready, but One of my events (PlayerMoveEvent) it's literally making a minimal bug (I think) for +1.9 servers

    well, the case is, as ever afk plugin, when a player moves, this one get unafk, but when a player get moves by an entity (an example a mob) this still detecting the player as unafk because is [moving] but by an entity.

    there's a way for ignore if a player moves but caused by an entity? thanks.
     
  2. MiniDigger

    Supporter

    make afk players ignore collision seems like the easiest fix.
    another way would be to not check if the players location moved, but his head rotation (pitch+yaw) changed (caused by mouse movement).
     
  3. What do you mean with this? maybe an example?