Solved Listening to packet 0x0a

Discussion in 'Plugin Development' started by rfrehv, Nov 27, 2012.

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


    Hi, how would I listen to packet 0x0a (Player // ground)?

    I need to check if player is on ground(duh). And no, every other approach didn't work the way I need it (checking the underneath block for example).

    Thanks in advance.
  2. Offline


  3. Offline


    The plugin I'm developing is quite small, I wouldn't go and require dependency of your lib just to listen to 2 bytes of data :p

    I guess I'll have to work with the limitations of my current check, and put aside my perfectionism... :(
  4. Offline


    Actually, come to think of it, there is a onGround field in net.minecraft.server.Entity. And it's updated whenever a flying packet (0x0A) is received.

    Note that it's not invoked until after the PlayerMoveEvent is called.

    I guess I should have checked for an easier solution before I suggested ProtocolLib ... but if you have a hammer, every problem looks like a nail. :p
    rfrehv likes this.
  5. Offline


    How dumb of me :p
    I knew bukkit didn't have onGround, but forgot to check NMS code. Sorry :D
  6. Offline


Thread Status:
Not open for further replies.

Share This Page