Solved Player gets Knockback from Kill after death.

Discussion in 'Spigot Plugin Development' started by Th3Wh1teG0d, Jan 9, 2020.

Thread Status:
Not open for further replies.
  1. Hello, i have made a function that the player respawns automatticly when he dies but the knockback from the damage that killed he push him after respawn :/ how do i fix that ?
     
  2. Set the velocity to 0.
     
    • Like Like x 1
  3. Can't really remember how I did this once. But I'll give it a try:

    Before respawning the player, set the player velocity to 0. (PlayerDeathEvent)
    Code (Java):
    player.setVelocity(new Vector());
     
    • Agree Agree x 1
  4. Works fine!

    Thanks :D
     
Thread Status:
Not open for further replies.