Skip to content

About

Form API library for PocketMine-MP plugins

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

pmforms

Form API library for PocketMine-MP and Axolotl-PM plugins. This repository is a fork of dktapps-pm-pl/pmforms, tracking its latest upstream code and retaining the original dktapps\pmforms namespace.

Compatibility

  • PHP 8.1 or newer
  • PocketMine-MP API 5.x
  • Axolotl-PM 5.49.1 for development analysis and DevTools integration

Include in a plugin

With Poggit, add the virion to .poggit.yml:

projects:
  YourPlugin:
    libs:
      - src: NhanAZ-Libraries/pmforms/pmforms
        version: ^2.3.0

Demo 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.

Develop with DevTools

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.0

DevTools 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.

Development checks

composer install
composer validate --strict
composer analyse

PHPStan runs at max against Axolotl-PM 5.49.1.

About

Form API library for PocketMine-MP plugins

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages