[{"data":1,"prerenderedAt":103},["ShallowReactive",2],{"plugin-ContentForge/FormConstructor":3},{"api_version":4,"authors":5,"categories":9,"created_at":10,"dependencies":11,"description":12,"detection_confidence":13,"downloads":14,"gallery":15,"icon_url":20,"id":21,"license":22,"links":26,"manifest_path":27,"name":28,"primary_target":29,"server_version":7,"source":30,"stars":31,"summary":32,"targets":33,"updated_at":36,"versions":37},"2.0.0",[6],{"avatar_url":7,"name":8,"url":7},"","ScarletRedMan",[],1627098828,[],"![logo by @tolimag](https://raw.githubusercontent.com/ContentForge/FormConstructor/master/.github/logo.png)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-2.0.0-brightgreen)](https://github.com/ContentForge/FormConstructor/releases/tag/2.0.0)\n\n:warning:  Discontinued :warning: \n======\nI stopped writing plugins for Nukkit and I don't see any point in supporting this project. \nUse a good fork that my friend made: https://github.com/MEFRREEX/FormConstructor\n\n\n\nIntroduction\n------------- \n\nLibrary is designed to simplify the creation and handling of forms.\nIt has a few key advantages over other  form libraries:\n\n- Forms are processed using a lambda, which is passed when the form itself is created, and not by catching events.\n- For each button we can set a lambda function in SimpleForm.\n- In SimpleForm we get a button object as a response, where we can get its text and index.\n- In CustomForm we can mark elements with an identifier to conveniently get this element in its handler. We can get element by id and its index.\n- Easy async handling.\n\nExamples\n-------------\n\n### SimpleForm\n```java\nSimpleForm form = new SimpleForm(\"Sample title\");\n\nSimpleFormHandler handler = (p, button) -> {\n    p.sendMessage(\"Your selected button is \" + button.getName());\n    p.sendMessage(\"Its index - \" + button.index);\n};\n\nform.setContent(\"This is a text\")\n    .addContent(\"\\nThis is addition :3\")\n    .add(new Button(\"Test button\", handler))\n    .add(new Button(\"Same button but with image\", Button.Icon.texture(\"textures/items/diamond\"), handler));\n\n//We can set handler for null result\nform.setOnCloseHandler(p -> {\n    p.sendMessage(\"Why you closed this form? :c\");\n});\n\nform.send(player);\n```\n\n### ModalForm\n```java\nModalForm form = new ModalForm(\"Test modal form\");\n\nform.setContent(\"Is OneKN gay?\") //local meme in RuNukkitDev\n    .setPositiveButton(\"Yes\")\n    .setNegativeButton(\"Sure\");\n\nform.setResponse((p, result) -> {\n    p.sendMessage(result? \"I knew it!\" : \"Quite right :D\");\n});\n\nform.send(player);\n```\n\n### CustomForm\n```java\nCustomForm form = new CustomForm(\"Sample custom form\");\n\nList\u003CSelectableElement> elements = Arrays.asList(\n    new SelectableElement(\"Option 1\"),\n    new SelectableElement(\"Option 2 but with value\", 42),\n    new SelectableElement(\"Option 3\")\n);\n\nform.add(new Label(\"This is a test\"))\n    .add(\"Easy way to add a label\")\n    .add(\"my-text\", new Input(\"A sample input\"))\n    .add(\"my-toggle\", new Toggle(\"Toggle?\", true))\n    .add(\"my-dd\", new Dropdown(\"Dropdown\",  elements))\n    .add(new Dropdown(\"Dropdown with default value\", elements, 1))\n    .add(\"my-ss\", new StepSlider(\"Step slider\", elements, 2));\n\nform.setHandler((p, response) -> {\n    //We can get by id and index\n    p.sendMessage(response.getInput(\"my-text\").getValue());\n    p.sendMessage(response.getInput(1).getValue()); //It's bad practice. Do not use indexes\n    p.sendMessage(response.getToggle(\"my-toggle\").getValue());\n    \n    SelectableElement el = response.getDropdown(\"my-dd\").getValue();\n    p.sendMessage(el.getText());\n    if(el.getValue() != null) p.sendMessage(el.getValue(Integer.class));\n    \n    el = response.getStepSlider(\"my-ss\").getValue();\n    p.sendMessage(el.getText());\n});\n\nform.send(player);\n```\n\n### Async handling\nAlso you can use method `form.sendAsync(player)` for using async form handling.\n","high",0,[16],{"created":17,"description":7,"title":18,"url":19},"2026-03-10","logo by @tolimag","https://raw.githubusercontent.com/ContentForge/FormConstructor/master/.github/logo.png","https://avatars.githubusercontent.com/u/78837507?v=4","ContentForge/FormConstructor",{"id":23,"name":24,"url":25},"MIT","MIT License","https://spdx.org/licenses/MIT.html",null,"src/main/resources/plugin.yml","FormConstructor","nkx","https://github.com/ContentForge/FormConstructor",10,"Library for easy creating and handling of forms",[29,34,35],"nkmot","pnx",1749489069,[38,49,58,67,76,85,94],{"changelog":39,"downloads":14,"files":40,"name":46,"prerelease":47,"published_at":48,"version":4},"### Changelog\r\n- Switched to Gradle project from Maven\r\n- Removed useless Text Input Validator\r\n- Removed Builder for Input\r\n- Renamed methods and some classes\r\n- Refactored Button Icons\r\n- Thread-safe form handler execution\r\n- Updated for PowerNukkitX 2.0",[41],{"filename":42,"primary":43,"size":44,"url":45},"FormConstructor.jar",true,27399,"https://github.com/ContentForge/FormConstructor/releases/download/2.0.0/FormConstructor.jar","FormConstructor 2.0.0",false,1712332013,{"changelog":50,"downloads":14,"files":51,"name":55,"prerelease":47,"published_at":56,"version":57},"### Changelog\r\n- Made a separate method for async form sending",[52],{"filename":42,"primary":43,"size":53,"url":54},33023,"https://github.com/ContentForge/FormConstructor/releases/download/1.1.3/FormConstructor.jar","FormConstructor 1.1.3",1643605866,"1.1.3",{"changelog":59,"downloads":14,"files":60,"name":64,"prerelease":47,"published_at":65,"version":66},"**Changelog**\r\n\r\n- CustomForm has async handling\r\n- Added sending method for CustomForm with setting handler\r\n- Added sending method for ModalForm with setting handler",[61],{"filename":42,"primary":43,"size":62,"url":63},32861,"https://github.com/ContentForge/FormConstructor/releases/download/1.1.2/FormConstructor.jar","FormConstructor 1.1.2",1636003646,"1.1.2",{"changelog":68,"downloads":14,"files":69,"name":73,"prerelease":47,"published_at":74,"version":75},"### Changelog\r\n\r\n- Added getter of elements list in CustomForm.\r\n- Added getter of buttons list in SimpleForm.\r\n- Simplified adding Label in CustomForm.",[70],{"filename":42,"primary":43,"size":71,"url":72},26190,"https://github.com/ContentForge/FormConstructor/releases/download/1.0.3/FormConstructor.jar","FormConstructor 1.0.3",1629171077,"1.0.3",{"changelog":77,"downloads":14,"files":78,"name":82,"prerelease":47,"published_at":83,"version":84},"### Changelog\r\n\r\n- Refactored with Lombok.\r\n- Implemented validation of CustomForm for StepSlider and Dropdown.\r\n- Implemented resend SimpleForm if validation failed.",[79],{"filename":42,"primary":43,"size":80,"url":81},26031,"https://github.com/ContentForge/FormConstructor/releases/download/1.0.2/FormConstructor.jar","FormConstructor 1.0.2",1628169638,"1.0.2",{"changelog":86,"downloads":14,"files":87,"name":91,"prerelease":47,"published_at":92,"version":93},"### Changelog\r\n\r\n- Added method for get all elements of a specific type in CustomForm.",[88],{"filename":42,"primary":43,"size":89,"url":90},25022,"https://github.com/ContentForge/FormConstructor/releases/download/1.0.1/FormConstructor.jar","FormConstructor 1.0.1",1627478709,"1.0.1",{"changelog":95,"downloads":14,"files":96,"name":100,"prerelease":43,"published_at":101,"version":102},"### Changelog\r\n- Added ModalForm\r\n- Added SimpleForm\r\n- Added CustomForm\r\n",[97],{"filename":42,"primary":43,"size":98,"url":99},24637,"https://github.com/ContentForge/FormConstructor/releases/download/1.0.0/FormConstructor.jar","FormConstructor 1.0.0",1627439854,"1.0.0",1773156789158]