Correct Code PHP: if($command->getName() == "infoui") {if(!$sender instanceof Player){$sender->sendMessage("§cThis works only in-game");return true;}if($this->getConfig()->get("enabled") === false){$sender->sendMessage("§cThis feature is disabled");return true;}$form = $this->getServer()->getPluginManager()->getPlugin("FormAPI")->createSimpleForm(function (Player $sender, $data) {switch($data) {case 0:$sender->sendMessage("Working!");break;}});$form->setTitle("Server Info");$form->setContent($this->getConfig()->get("text"));$form->addButton("OK!");$form->sendToPlayer($sender);}
you can see source, but befor please learn PHP (in you dont know ) also you can add files in to your own plugin or depend it in your plugin.