error: Code: [17:51:53] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.1.1': Argument 2 passed to gay\API::gay\{closure}() must be of the type array, null given, called in C:\Users\arjxy\Desktop\New folder\plugins\FormAPI-master\src\jojoe77777\FormAPI\FormAPI.php on line 75 on jojoe77777\FormAPI\FormAPI [17:51:53] [Server thread/CRITICAL]: TypeError: "Argument 2 passed to gay\API::gay\{closure}() must be of the type array, null given, called in C:\Users\arjxy\Desktop\New folder\plugins\FormAPI-master\src\jojoe77777\FormAPI\FormAPI.php on line 75" (EXCEPTION) in "core/src/gay/API" at line 20 code PHP: class API{ public static function sendForm(Player $player) { $api = $player->getServer()->getPluginManager()->getPlugin("FormAPI"); $form = $api->createSimpleForm(function (Player $player, array $data) { if (isset($data[0])) { $result = $data[0]; switch ($result) { case 0: $player->sendMessage("1"); return; case 1: $player->sendMessage("2"); return; } } }); $form->setTitle("test"); $form->setContent("testC"); $form->addButton("test1"); $form->sendToPlayer($player); } API::sendKitForm($commandSender);