There is most likely something else that you're doing incorrectly that is causing the code not to be run, since yes, the return value of Player#isJumping
is indeed a boolean value and that would follow correctly.
In what you've provided, nothing is technically incorrect, but it's hard to get a gauge of where the issue could be taking place with such a small snippet. Congratulations on starting to program your own plugins! It's a big and challenging step, but rewarding in the end.