Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Jump

Comments in 'Plugin Development' started by Kripak, Oct 22, 2015.

  1. XShockinFireX
    Offline

    XShockinFireX New Member

    Joined:
    Jan 28, 2016
    Posts:
    14
    Minecraft User:
    XShockinFireX
    This is the only method (I believe):
    PHP:
    public function onPacketReceived(DataPacketReceiveEvent $event) {
        if(
    $event->getPacket() instanceof PlayerActionPacket && $event->getPacket()->action === PlayerActionPacket::ACTION_JUMP) {
        
    // Code
        
    }
    }
    Last edited: Oct 18, 2016
    thebigsmileXD and MyNameIsTriXz like this.
  2. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Is that safely cancellable or will the client still execute the jump?
  3. XShockinFireX
    Offline

    XShockinFireX New Member

    Joined:
    Jan 28, 2016
    Posts:
    14
    Minecraft User:
    XShockinFireX
    The client will still execute the jump even if the event is cancelled, I don't think it's possible to prevent the client from jumping.
  4. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    I think a way would be levitation.. or maybe
    Onmove -> is moving upwards -> setmotion without Y change

Share This Page

Advertisement