Can someone help me with ModalForms? I tried to implement forms-api (created by pmmp) into the pocketmine source but it wouldn't work. I don't think I'm doing anything wrong. I added the functions to the Player class, I added the form folder, I also modified handleModalFormResponse() in PlayerNetworkSessionAdapter. I also tried to add it as a plugin but the form would never send and there would be no console errors. What could I possibly be doing wrong, can anyone name possible errors? If you are wondering why I am doing this, it is because I find it the most easiest to use and pmmp would probably never implement this lol (or take ages).
I honestly can't find any errors, the formData part seems fine, sending the packet seems fine too. I'm not sure if I'm doing anything wrong with handling the response. I had took the formapi from the pmmp branch, so any other functions you are looking for, you'll be able to find there. PHP: public function onDataPacketReceive(DataPacketReceiveEvent $event) { $packet = $event->getPacket(); /** @var CorePlayer $player */ $player = $event->getPlayer(); if($packet instanceof ModalFormResponsePacket) { $id = $packet->formId; $data = json_decode($packet->formData); $player->onFormSubmit($id, $data); }}