Yes. When the x and z coordinates of $event->getTo() are the same as the ones from $event->getFrom() the player didn't move. And when the y coordinate of $event->getTo() is bigger than the one of $event->getFrom() you know that the player jumped and let it go through. Else you cancel the event. You don't have to specifically do anything for the head movement.
Technically, unless your connection is extremely good, the client will jump up to the highest point before the network latency of (client move packet -> server cancel move event -> server packet to teleport back to original position) completes.