Solved Detecting when a player jumps?

Discussion in 'Plugin Development' started by IkeVoodoo, Oct 20, 2020.

  1. Offline


    Hello! I am trying to detect when a player jumps, right now i am doing:

    (e.getTo().getY() - e.getFrom().getY() >= 1.51)

    however.. it is not really working, since it activates even when i am jumping on a slime block, is there any way to stop this? (maybe checking if a slime block is on the bottom?)

    Thanks in advance
  2. Offline

    timtower Moderator Moderator

    @IkeVoodoo Stairs, ladders, swimming.
    Lots of reasons to go up though
  3. Offline


    Yeah, however it dosent seem to activate when i am going in ladders, staris, swimming, cobwebs, tnt, getting hit, getting hit off a cliff, levitation, and more (however if i go too fast on tnt it catches it with the speed catch but thats another problem ill address myself).

    I figured that checking the block below won't work since slimeblocks make you go JUMP, LAND, JUMP and on the first jump (if you fall from high enough) it will think you are hacking since on first land it won't, a few ticks after it will since the difference from

    e.geTo().getY() - e.getFrom().getY() is hier than 1.51


    I got it working!

    I found a thread sharing a PlayerJumpEvent and i so how they did it, they checked for a PlayerStaticIncrementEvent and then executed the event, so i did the same and it worked! (only copying the actual method that checked for jumping)
    Last edited: Oct 21, 2020

Share This Page