Since I started the game I'm working on, I've had this issue of my main character jumping twice. If you press the up key (jump) only once, he will jump once. But if you press it twice, he jumps, lands, then jumps again. I can't figure out why it is doing this. Twice is the max he will jump like that. Rapidly pressing the up key only results in two jumps. And no, there is never a mid air jump. He lands first. Here's the code.
public void act()
{
if(jump == true)
{
canJump = false;
jumpMethod();
}
}

