Solved Slowing a player a percentage

Discussion in 'Plugin Development' started by brord, Dec 17, 2013.

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

    brord

    Hey guys!

    Im lookign for an easy way to slow a player in percentage.
    Where 0% is no more movement possible, and 100% is normal.

    I can do this by listening for moveevent, and chaning the vectors and such, but this would be loading the server too much for such a simple task.

    I think it can be done with potions, but i wouldnt know how to :/

    Think anyone can help me with this matter?

    Thanks!
     
  2. Offline

    JRL1004

    brord
    Code:
    player.setWalkSpeed(p.getWalkSpeed() * (80 / 100.00));
    in theory should make the player move at 80% (80 / 100.00) of their current speed.
     
  3. Offline

    brord


    Oh thanks! I must have missed that function *derp*
     
Thread Status:
Not open for further replies.

Share This Page