Solved Distinguish between looking around and walking on playerMoveEvent?

Discussion in 'Plugin Development' started by jtjj222, Dec 17, 2012.

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

    jtjj222

    Hello, I was wondering, how would I stop a player from walking, but still let them look around? Both trigger the PlayerMoveEvent, so is there a different event I could use, or a way to distinguish between walking and rotating from within the PlayerMoveEvent? Thanks for help in advance.
     
  2. Offline

    ferrybig

    lok if the x,y or z has chanced at the event
     
  3. Offline

    asofold

    You might want to decide what accuracy to use. CraftBukkit only puts events through that make a difference of more than 10 degrees looking angle (roughly) or more than 0.0625 or so blocks distance. In order to find those small differences you would have to take Player.getLocation() into account, if that much accuracy is needed.
     
  4. Offline

    jtjj222

    I was afraid of that. I thought there would be a more elegant way. Thanks :D
     
Thread Status:
Not open for further replies.

Share This Page