Vector unitVector = new Vector(player.getLocation().getDirection().getX(), 0, player.getLocation().getDirection().getZ()); unitVector = unitVector.normalize(); player.setVelocity(unitVector.multiply(2));