If there is a getvelocity() is there also a setVelocity()? Mind explaining how that would work, or if it's possible to change a players walk or sprint velocity?
Using .setVelocity tends to be a bit choppy. A smoother method is to use applyPotionEffect() with a speed/slow potion as the effect.
Maybe, but couldn't you make it with a vector of doubles and have the doubles be very small like .0000001? I think that's how the default movement works.
The values aren't the issue. The issue is that the client thinks you're moving at one speed, while the server thinks you're moving at another. This creates a bit of choppyness when moving.
Just use the method from above. Code:Java Vector velocity = e.getPlayer().getVelocity(); Where e is the PlayerMoveEvent name in the parameters Another way could be to use the getFrom() and getTo() methods of the PlayerMoveEvent and check if the distance of that is above a certain threshold. Code:Java if(e.getFrom().distance(e.getTo()) > 1.0) // do whatever you want to do if it's too high And replace the 1.0 with whatever the default movement speed is (since I'm not sure).
On the speed potion, are there different levels of speed, or can you programmatically make a player insanely fast with it?
With the constructor, you can set the intensity of the effect, but anything past 5 makes the player move backwards.
That's not true. I did a lot of testing with that a while ago. It is something like anything greater than 11 inverses all controls, not 5.
I made a plugin where one could make a command where one could go up to x10 for the speed potion. They type in /spl 10 and it gave them a speed potion of 10. I know the limit is higher than 5.