TOOL

server-ui Form Builder

Once you build the form, the script code is automatically generated. You can even use the virtual UI to verify that it works properly.

T6NetWork › Tools › server-ui Form Builder

This is for the traditional ActionFormData, ModalFormData, and MessageFormData. For the new OreUI (DDUI) CustomForm, please use the OreUI version of the form builder.

Virtual UI (You can actually move it around)

When you click “▶ Run,” a form will appear here.
You can click the buttons or enter text to see how it works.
Chat Commands for Player "Steve"
The final response (the value that goes into the `response` variable in the code)
(Not yet)

Generated code (e.g., `scripts/main.js`)

How to Use the server-ui Form Builder

Script API's @minecraft/server-ui Using this, you can display button menus (ActionForm), input forms (ModalForm), and confirmation dialogs (MessageForm) to the player.These are standard features—such as server menus, shops, and settings screens—but writing the code manually can make it difficult to understand the button layout and how return values are handled. This builder automatically generates code that behaves exactly as if you were assembling the form on screen, and you can even test the behavior by clicking buttons in a virtual UI.

Procedure

  1. Select the form type, then enter the title and body text.
  2. Add and rearrange components such as buttons, toggles, sliders, and text input fields.
  3. Use the virtual UI to perform operations and verify that the entered values are being passed correctly.
  4. Paste the generated code into a script to use it.

Things to Keep in Mind When Writing Code

  • The result of displaying the form is canceledFirst, check whether it is (closed).
  • The results of the ModalForm are formValues ...and they are inserted in the order of the parts.
  • Since it may not be displayed while the chat screen is open, we'll add a process to redisplay it if necessary.

A new lookOreUI (DDUI) BuilderThere is also a `manifest.json` file, which isHereYou can make it with...

Other Tools

Back to the Tools List

Frequently Asked Questions

Can I use this tool to create code that actually runs in a game?

Yes. The tool generates JavaScript code that uses @minecraft/server-ui’s ActionFormData, ModalFormData, and MessageFormData—code that you can paste directly into your add-on. The virtual UI on the right displays the generated code as it runs, so you can verify how buttons behave and how entered values are passed before you even enter the game.

What is the difference between 1.x and 2.x?

In 2.x, you can use headers, labels, and dividers, and pass options for dropdowns and sliders as objects (e.g., { defaultValue: 50 }).In version 1.x, these elements are not available, and options are passed as a list of arguments. Switching the “Version” setting will change the generated code and the behavior of the virtual UI. You can also use this to verify when converting code written for version 1.x to version 2.x.

What is UserBusy?

If you try to display a form while a chat window or similar is open, the game will return a result with `cancelationReason` set to `UserBusy` without displaying the form. This often happens when opening a menu using a chat command. If you enable “UserBusy Workaround,” code will be added to wait a moment and then automatically redisplay the form.In the Virtual UI, you can reproduce this situation by selecting “Set next display to UserBusy.”

Can I test the code I wrote myself?

Yes. You can edit the code field directly. You can also run scripts you've written by hand (or pasted) in the virtual UI. While you're editing the code, the settings on the left won't be applied. Click "Restore Auto-Generation" to revert to the code generated based on the settings on the left.

Are there any items that don't work in the simulator?

Only some of the `player`'s methods—such as `sendMessage`, `runCommand`, `tag`, and `playSound`—will work. The others will do nothing and continue execution, logging a warning. Please verify any processing related to the world's state in the actual game. For `MessageFormData` selection, follow the official sample: `button1` is 0 and `button2` is 1.