1.7.2 sprint

Discussion in 'Plugin Development' started by SzymonOwca, Dec 15, 2013.

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

    SzymonOwca

    Hi,

    Is it possible to disable the new sprint in minecraft 1.7.2 (CTRL + W) ?
     
  2. Offline

    Quaro

    PlayerMoveEvent
    event.getPlayer().setSprinting(false);
     
  3. Offline

    SzymonOwca

    But I do not want to completely disable the sprint. I want to turn off automatic sprint (ctrl + w) added in minecraft 1.7.2
     
  4. Offline

    viper_monster

  5. Offline

    Gopaintman

    Yea, I agree with spoljo666 . That is controlled by the client.
     
  6. Offline

    TeeePeee

    I'm not sure if Bukkit is exact enough, but you could try this:

    When players double-tap the forwards key (w) to sprint, they must slow down (but not stop) for a fraction of a second before the sprint begins. However, when they use ctrl + w, there is no momentary slowdown.

    It's somewhat demanding, but you could store the players sprinting state to a map with their velocity vector and compare it to the next movement tick. Conceptually, you would be able to tell if a player double-tapped to sprint because their velocity would be non-zero, but not sprinting speed either.
     
  7. Offline

    SzymonOwca

    Thanks, Solved
     
Thread Status:
Not open for further replies.

Share This Page