Form API library for PocketMine-MP plugins
- PHP 8.1 or newer
- PocketMine-MP API 5.x
- Axolotl-PM 5.51.1 for development analysis and DevTools integration
Use the repository as a local development virion with DevTools. Put the checkout in virions/pmforms/ and declare it in the consuming plugin's devtools.yml:
virions:
- name: pmforms
version: ^2.3.1DevTools uses the shared source during development and injects the virion into the consumer PHAR during the build. The production server does not need DevTools installed for the resulting plugin.
examples/DevToolsConsumer/ is a runnable demo plugin adapted from the upstream pmforms-demo. It demonstrates MenuForm with a URL image, ModalForm, CustomForm, form close callbacks, custom form elements, and reading typed values from CustomFormResponse.
Run one of these commands in game to open a form:
/form menu
/form modal
/form custom
You can also target online players by name, for example /form custom Steve. The same example is built and analyzed with DevTools in CI, using the devtools.yml beside its plugin.yml.
The root virion.yml lets Axolotl-PM DevTools load this checkout as a shared development virion. Put the repository at virions/pmforms/, then declare it in the consuming plugin's devtools.yml:
virions:
- name: pmforms
version: ^2.3.1DevTools uses the shared source during development and shades the library into a standalone plugin PHAR when building. The production plugin does not need DevTools installed. The demo plugin is also the DevTools consumer example, built and analyzed in CI.
composer install
composer validate --strict
composer analysePHPStan runs at level max against Axolotl-PM 5.51.1.
The original author is dktapps. AxolotlBucketLabs maintains this fork for Axolotl-PM API 5.