The pilot in command of an in-flight plane is a peace officer under the Criminal Code. If you are caught smoking or vaping during the flight, the pilot may arrest you as a peace officer. When the plane lands, the police may be waiting at the gate to take you to the airport security holding cell.