PHP: public function onMove(PlayerMoveEvent $e){$p = $e->getPlayer();if(($player->getInAirTicks() > 30) >= 2000) {//Player is flying (When is falling it detect too)}}
It is PHP: if($p->isFlying()){ EDIT: @Jonas if u want block fly hackers do not use isFlying it is checking only players that has allowFlight by Server