Problem with Player.setSprinting()

Discussion in 'Plugin Development' started by XDKara, Jul 15, 2020.

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

    XDKara

    When I move I am sprinting that is right, but if I jump (in air), it stops sprinting and speed is same as not sprinting, when I touch the ground all is again right.

    Code:
    @EventHandler
        public void onPlayerMoveEvent(PlayerMoveEvent e) {
            if (sprinting) {
                e.getPlayer().setSprinting(true);
            }
        }
    (boolean) sprinting - by command you can enable or disable (default: true)

    I am beginner, so I will be grateful for reply.
    Sorry for my bad english.
     
Thread Status:
Not open for further replies.

Share This Page