Answers for "Spigot how to push player"

1

Spigot how to push player

Vector unitVector = new Vector(player.getLocation().getDirection().getX(), 0, player.getLocation().getDirection().getZ());
unitVector = unitVector.normalize();             
player.setVelocity(unitVector.multiply(2));
Posted by: Guest on November-06-2020

Browse Popular Code Answers by Language