You'll need to set the players velocity to zero every tick. Or find some way to prevent their movement. Then you'll need to change the velocity of the entity in an input event.
We all use an IDE. Which allows use to look through the source code. If I'm not mistaken a lot of the Minecraft source for 1.14 is still being made readable you know after obfuscation.