FormAPI is a powerful UI forms framework for PMMPCore Framework that brings advanced form capabilities to Minecraft Bedrock. Create modal forms, button menus, confirmation dialogs, and custom action forms with a clean Promise-based API for plugin developers.


What Does This Plugin Do?
FormAPI provides a developer-friendly abstraction over Minecraft Bedrock's action forms, modal forms, and message forms. It offers a queue-based form system with timeouts, validation, and a clean Promise API that makes building complex UI flows simple and reliable.
⚠️ Requirements
| Requirement |
Status |
Details |
| ❌ PMMPCore Framework |
Required |
This plugin cannot work without PMMPCore Framework installed. |
| ✅ Plugin Developers |
Recommended |
Designed for developers building UI forms, not end users. |
Key Features
- ✅ Modal Forms: Create complex modal forms with text fields, toggles, dropdowns, sliders, and labels.
- ✅ Button Menus: Action forms with configurable buttons and result handling.
- ✅ Confirmation Dialogs: Simple yes/no confirmation forms with customizable sides.
- ✅ Form Queue: Sequential form processing with timeout handling and error recovery.
- ✅ Promise-Based API: Clean async/await interface for form creation and response handling.
- ✅ Client-Side Forms: Leverages native Bedrock UI forms for best performance.
- ✅ Validation: Built-in field validation (required fields, max length, etc.).
- ✅ Demo Command: Interactive demo showing all form types in a workflow.
🛠️ Available Commands
| Command |
Syntax |
Description |
| formapi_demo |
/formapi_demo |
Open interactive FormAPI demo (menu → confirm → modal) |
Developer API
FormAPI exposes a clean Promise-based API for creating forms:
import * as Forms from "./formsApi.js";
// Create a button menu
const menu = await Forms.showButtonMenu(player, {
title: "Menu Title",
body: "Choose an option",
buttons: [
{ id: "option1", text: "Option 1" },
{ id: "option2", text: "Option 2" }
]
});
if (Forms.isFormOk(menu)) {
// menu.buttonId contains the selected button id
}
// Create a confirmation dialog
const confirm = await Forms.showConfirm(player, {
title: "Confirm",
body: "Are you sure?",
buttonLeft: "Yes",
buttonRight: "No",
confirmSide: "left"
});
if (Forms.isFormOk(confirm) && confirm.confirm) {
// User confirmed
}
// Create a modal form with multiple field types
const modal = await Forms.showModal(player, {
title: "Profile",
submitLabel: "Save",
fields: [
{ type: "label", text: "Fill your profile" },
{
type: "textField",
id: "name", label: "Name",
placeholder: "Steve", required: true, maxLength: 32
},
{
type: "toggle",
id: "vip", label: "VIP",
options: { defaultValue: false }
},
{
type: "dropdown",
id: "team", label: "Team",
items: ["Red", "Blue", "Green"],
options: { defaultValueIndex: 0 }
},
{
type: "slider",
id: "score", label: "Score",
min: 0, max: 100,
options: { defaultValue: 50, valueStep: 5 }
}
]
});
if (Forms.isFormOk(modal)) {
// modal.values contains field values keyed by id
}
Configuration Options
const FORM_API_CONFIG = {
plugin: { enabled: true },
demoCommand: {
enabled: true,
permission: "pmmpcore.formapi.demo"
},
limits: { maxButtons: 30 },
queue: { timeoutMs: 180000 }, // 3 minute timeout per form
debug: false
};
Form Types Available
| Type |
Function |
Use Case |
| Button Menu |
showButtonMenu() |
Selection screens, navigation menus |
| Modal Form |
showModal() |
Data entry, settings, registration |
| Confirm Dialog |
showConfirm() |
Yes/No confirmations, warnings |
| Message Box |
showMessage() |
Info dialogs, notifications |
Field Types for Modal Forms
| Field Type |
Description |
Options |
| label |
Static text label |
text |
| textField |
Text input field |
placeholder, required, maxLength |
| toggle |
On/off switch |
defaultValue |
| dropdown |
Selection dropdown |
items, defaultValueIndex |
| slider |
Numeric slider |
min, max, defaultValue, valueStep |
Compatibility & Requirements
- ⚠️ Requires PMMPCore Framework: This plugin is part of the PMMPCore ecosystem and cannot function independently.
- ✅ Version: Optimized for Minecraft Bedrock 1.21.70+ (Release).
- ✅ Multiplayer: Fully tested on Realms and Dedicated Servers.
- ✅ Developer Tool: Designed for plugin developers building custom UI workflows.
- ✅ License: GPL-3.0 - Free to use, modify, and distribute under the same terms.
Installation
- Download FormAPI from CurseForge (comes as .mcpack file)
- Change file extension: Rename
FormAPI.mcpack to FormAPI.zip
- Extract the archive: Unzip the file to access the contents
- Locate PMMPCore: Find your PMMPCore Framework installation folder
- Copy plugin files: From the extracted folder, copy the
FormAPI folder from scripts/plugins/
- Paste to plugins: Paste the folder into
scripts/plugins/ within PMMPCore
- Register plugins: Open
scripts/plugins.js and add the import:
// Add this line to your plugins.js file
import "./plugins/FormAPI/main.js";
- Restart server: Restart Minecraft Bedrock to load the plugin
- Verify installation: Use
/plugins to confirm plugin is loaded
Getting Started for Developers
- Install PMMPCore Framework first (required dependency)
- Follow the installation steps above to add FormAPI
- Import
formsApi.js in your plugin to start using the API
- Use the demo command
/formapi_demo to explore form types
- Build custom forms using the Promise-based API
Need help building forms? Join our Discord Server for developer support!
⚠️ Important Notice: This plugin requires PMMPCore Framework and is designed for plugin developers building custom UI workflows.