I got it now PHP: if($event->getAction() == PlayerInteractEvent::RIGHT_CLICK_AIR){} (For those who have the same problem)