I'm trying to make a plugin where when you right click a block an ui opens but nothing happens what is wrong? https://github.com/jennocool/guncrafter
I'm fairly certain that your code should show an error in your console, because you use $player in line 99, but that variable isn't defined. Use $event->getPlayer() instead.
I'm also pretty sure the function: $form->sendToPlayer($player); is deprecated. Use $player->sendForm($form) instead. https://github.com/pmmp/PocketMine-...f5aa7fcb44d0f/src/pocketmine/Player.php#L3395
Log something on that event. Because if that doesn't work I'm not even sure it actually runs the code.
and make sure the events are registered correcttly inside the onEnable function. Because you don't there is a typo: https://github.com/jennocool/guncra...7a48af850bc12f1e/src/gun/crafter/Main.php#L20 So it makes a lot of sense it doesn't work.