Discussion in 'Plugin Development' started by SzymonOwca, Dec 15, 2013.
Is it possible to disable the new sprint in minecraft 1.7.2 (CTRL + W) ?
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
SzymonOwca I don't think it is possible...
Yea, I agree with spoljo666 . That is controlled by the client.
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.
Separate names with a comma.