how do i prevent moon jumping?

I have this platformer so obviously you can jump but I want to make it where you can’t moon jump (keep pressing the jump button)

You can take a look at the “Run & Jump” bundle for an example using a switch.