{"id":15143900,"url":"https://github.com/ghostlymc/g-forms_old","last_synced_at":"2026-01-10T03:02:06.813Z","repository":{"id":60853622,"uuid":"516180455","full_name":"GhostlyMC/G-Forms_old","owner":"GhostlyMC","description":"API for create Forms in PocketMine-MP","archived":true,"fork":false,"pushed_at":"2022-10-29T23:08:16.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-13T15:23:38.372Z","etag":null,"topics":["formapi","plugins","pmmp-plugins","pocketmine-plugin","pocketmine-plugins"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zOmArRD/G-Forms","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GhostlyMC.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-21T01:05:58.000Z","updated_at":"2023-07-05T11:31:21.000Z","dependencies_parsed_at":"2022-11-03T02:45:21.374Z","dependency_job_id":null,"html_url":"https://github.com/GhostlyMC/G-Forms_old","commit_stats":null,"previous_names":["ghostlymc/g-forms"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostlyMC%2FG-Forms_old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostlyMC%2FG-Forms_old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostlyMC%2FG-Forms_old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GhostlyMC%2FG-Forms_old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GhostlyMC","download_url":"https://codeload.github.com/GhostlyMC/G-Forms_old/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246349565,"owners_count":20763200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formapi","plugins","pmmp-plugins","pocketmine-plugin","pocketmine-plugins"],"created_at":"2024-09-26T10:20:31.399Z","updated_at":"2025-12-29T20:20:55.881Z","avatar_url":"https://github.com/GhostlyMC.png","language":"PHP","readme":"# G-Forms ![visitors](https://visitor-badge.glitch.me/badge?page_id=G-Forms)\n\nA simple Form API for GhostlyMC Network.\n\nVery helpful for make Forms in PocketMine-MP.\n\n### Features\n\n- Simple API\n- Fast and Secure\n- A good documentation\n\n## Get Started\n\n### Install the API\nOpen your CLI and execute this command:\n\n```bash\ncomposer require ghostlymc/g-forms\n```\n\n### Using the API\n#### 1 - Create a Simple Form.\n\n```php\nuse pocketmine\\player\\Player;\nuse ghostlymc\\forms\\GForms;\nuse pocketmine\\Server;\n\npublic function simpleForm(Player $player): void\n{\n    $form = GForms::createSimpleForm(function(Player $player, Player $data) {\n        $player-\u003eteleport($data-\u003egetPosition())\n        $player-\u003esendMessage(\"you were teleported to {$data-\u003egetName()}\");\n    });\n    \n    $form-\u003esetTitle('Player Teleport');\n    $form-\u003esetContent('Select a player to teleport');\n    foreach (Server::getInstance()-\u003egetOnlinePlayers() as $p) {\n        $form-\u003eaddButton($p-\u003egetName(), $form::IMAGE_TYPE_NONE, '', $p);\n    }\n    $player-\u003esendForm($form);\n}\n```\n#### 2 - Create a Modal Form.\n\n```php\nuse pocketmine\\player\\Player;\nuse ghostlymc\\forms\\GForms;\n\npublic function modalForm(Player $player): void\n{\n    $form = GForms::createModalForm(function(Player $player, bool $data) {\n        if ($data) {\n            $player-\u003esendMessage('You clicked yes');\n        } else {\n            $player-\u003esendMessage('You clicked no');\n        }\n    });\n    $form-\u003esetTitle('Modal Form');\n    $form-\u003esetContent('Do you want to continue?');\n    $form-\u003eaddButton('Yes');\n    $form-\u003eaddButton('No');\n    $player-\u003esendForm($form);\n}\n```\n\n#### 3 - Create a Custom Form.\n\n```php\nuse pocketmine\\player\\Player;\nuse ghostlymc\\forms\\GForms;\n\npublic function customForm(Player $player): void\n{\n    $form = new CustomForm(function(Player $player, array $data) {\n        $player-\u003esendMessage(\"Your username is {$data['label-username']}\");\n    });\n    $form-\u003esetTitle('Title of the form');\n    $form-\u003eaddInput('Name', 'Enter your username', null, 'label-username');\n    # Labels are optional\n    $form-\u003eaddInput('Password', 'Enter your password', 'default password', 'label-password');\n    $form-\u003eaddLabel('This is a label');\n    $form-\u003eaddToggle('Milk Enabled', $player-\u003eisMilkEnabled(), 'label-milk');\n    $form-\u003eaddDropdown('Choose', ['Option 1', 'Option 2', 'Option 3'], 0, 'label-dropdown');\n    $player-\u003esendForm($form);\n}\n```\n\n## Support\nIf you have a problem with the API, please contact create an issue.\n\nThis is an open source project, so if you want to help, please help us.\n\nForked from [Link](https://github.com/jojoe77777/FormAPI)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostlymc%2Fg-forms_old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostlymc%2Fg-forms_old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostlymc%2Fg-forms_old/lists"}