Man jailed after cockpit attack