PHP: $player->setMotion($player->getDirectionVector()->multiply(2));//set 2 to whatever amount of force you want to apply to the player