Guys please help i 'm getting mad and this is my 5/6 attempt to make formapi work PHP: <?phpnamespace flyui;use pocketmine\plugin\PluginBase;use pocketmine\command\{ Command, CommandSender};use jojoe77777\FormAPI;use pocketmine\{ Player, Server};use pocketmine\event\Listener;class FlyUI extends PluginBase implements Listener { public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this, $this); } public function onCommand(CommandSender $player, Command $cmd, string $label, array $args) : bool{ if(strtolower($cmd->getName() == "flyui")){ if($player->hasPermission("flyui.dragonsmp")){ $this->flyui($player); return true; } } } public function flyui(Player $player){ $api = $this->getServer()->getPluginManager()->getPlugin("FormAPI"); if($api === null || $api->isDisabled()){ return true; } $form = $api->createSimpleForm(function(Player $player, array $data){ $result = $data[0]; if($result === null){ return true; } switch($result){ case 0: $player->setAllowFlight(true); $player->sendMessage("Fly On"); return true; case 1: $player->setAllowFlight(false); $player->sendMessage("Fly Off"); } }); $form->setTitle("FlyUI"); $form->setContent("Select On or Off"); $form->addButton("On"); $form->addButton("Off"); $form->sendToPlayer($player); }}?> and this is the plugin.yml: Code: --- name: FlyUIKhaled098yt version: 1.0 api: [3.0.0-ALPHA10] main: flyui\FlyUI author: Khaled commands: flyui: description: Fly UI permissions: flyui.dragonsmp: description: Permission FlyUI But when i pit the plugin in the Plugins folder and restart the server the plugin doesnt even show up.
If the plugin doesn't even show up, it has nothing to do with FormAPI. Also, make sure you add this line in plugin.yml if you use FormAPI: Code: depend: FormAPI
You don't need to break if you returned. I don't know why everyone can't even understand this basic concept in flow of control.
This evil break is even in Specter https://github.com/Falkirks/Specter/blob/master/src/specter/Specter.php#L56
This has something to do with your environment setup. Do you have DevTools installed? Where did you put your plugin folder? Is your plugin.yml placed correctly?
Everything is set up correctly and transformed it into phar but when i put it in the Plugins folder its just like i didnt put anything in it