Think of how gravity works. When you jump gravity doesn't stop, it is simply overwhelmed by the amount of force you used to push yourself off the ground, however it is still acting on you, slowing you down until you stop moving upwards. For a fraction of a second you are actually still in the air. Then you start to come down as only gravity is acting on you.
You will need to do a lot of similar thinking when you program.
So a good way is to set an "up" movement on you Z and have the gravity subtract from it. A good way to do that is set one of the skills as the gravity and have it pull the player down all the time and have a function check on it's gravity and if it gets to high thanks to the jump have it lower it slowly until you get back to the correct negative z.