PHPackages                             dresnite/easyui - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dresnite/easyui

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dresnite/easyui
===============

EasyUI is an intuitive and easy-to-use form library for PocketMine-MP. Designed to let you focus on your project and not on how the library works.

1.1.0(4mo ago)2952419[3 issues](https://github.com/dresnite/easyui/issues)LGPL-3.0PHP

Since Feb 17Pushed 4mo agoCompare

[ Source](https://github.com/dresnite/easyui)[ Packagist](https://packagist.org/packages/dresnite/easyui)[ RSS](/packages/dresnite-easyui/feed)WikiDiscussions pm5 Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

EasyUI
======

[](#easyui)

EasyUI is an intuitive and easy-to-use form library for PocketMine-MP. Designed to let you focus on your project and not on how the library works.

Download
--------

[](#download)

You can download the virion in [Poggit](https://poggit.pmmp.io/ci/dresnite/easyui/libEasyUI).

Code examples
-------------

[](#code-examples)

### General rules

[](#general-rules)

All the closures passed to EasyUI classes must declare a variable of the class Player as first and only argument, except for the CustomForm submit listener, which also requires FormResponse as second parameter.

### SimpleForm

[](#simpleform)

Creating a form with a button without an icon:

```
$form = new SimpleForm("This is the title");
$form->addButton(new Button("Say hi", null, function(Player $player) {
    $player->sendMessage("Hello!");
}));
$player->sendForm($form);
```

Creating a form with a button with an icon:

```
$form = new SimpleForm("This is the title");
$form->addButton(new Button("Press me!", new ButtonIcon("https://introduce-the-image-url.here"), function(Player $player) {
    $player->sendMessage("Hey! Thanks for pressing me :)");
}));
$player->sendForm($form);
```

Creating a form with a header text (optional):

```
new SimpleForm("This is the title", "This is the header text");
```

Controlling what happens when a form closes (optional):

```
$form->setCloseListener(function(Player $player) {
    echo "The form was closed!";
})
```

### ModalForm

[](#modalform)

Creating a modal form and handling what happens when the player presses "accept" or "deny":

```
$form = new ModalForm("The title goes here!", "Do you want this plugin to save you a lot of time?");
$form->setAcceptListener(function(Player $player) {
    $player->sendMessage("Great! Keep building good software");
});

$form->setDenyListener(function(Player $player) {
    $player->sendMessage("Whatever :/");
});
```

You can also change the text of the buttons:

```
$form->setAcceptText("Yes");
$form->setDenyText("Yesn't");
```

### CustomForm

[](#customform)

Creating a custom form with an input and a dropdown

```
$form = new CustomForm("This is the title!");
$form->addElement("my_text", new Input("This is the input header text!"));

$dropdown = new Dropdown("This is the dropdown header text");
$dropdown->addOption(new Option("broadcast", "Broadcast message"));
$dropdown->addOption(new Option("send_to_myself", "Send message to myself"));

$form->addElement("what_to_do", $dropdown);

$form->setSubmitListener(function(Player $player, FormResponse $response) {
    $submittedText = $response->getInputSubmittedText("my_text");
    $submittedOption = $response->getDropdownSubmittedOptionId("what_to_do");
    if($submittedOption === "send_to_myself") {
        $player->sendMessage($submittedText);
    } elseif($submittedOption === "broadcast") {
        foreach($player->getServer()->getOnlinePlayers() as $onlinePlayer) {
            $onlinePlayer->sendMessage("[BROADCAST] $submittedText");
        }
    }
});
```

Object oriented approach
------------------------

[](#object-oriented-approach)

In some cases, the forms are huge and mess up the code. In those cases, you can use a more object oriented approach to keep the code as clean as possible.

### SimpleForm

[](#simpleform-1)

```
class ExampleForm extends SimpleForm {

    public function __construct() {
        parent::__construct("Form title");
    }

    protected function onCreation(): void {
        $button = new Button("A very very big button");
        $button->setIcon(new ButtonIcon("https://a-cool-url.i.think"));
        $button->setSubmitListener(function(Player $player) {
            $player->sendMessage("Making this form was so easy!");
        });
        $this->addButton($button);
    }

}
```

### ModalForm

[](#modalform-1)

```
class ExampleForm extends ModalForm {

    public function __construct() {
        parent::__construct("The title", "The content text");
    }

    protected function onAccept(Player $player): void {
        $player->sendMessage("You pressed 'Accept' :(");
    }

}
```

**NOTE**: `onCreation()` is also available on ModalForms.

### CustomForm

[](#customform-1)

```
class ExampleForm extends CustomForm {

    public function __construct() {
        parent::__construct("The title goes here");
    }

    public function onCreation(): void {
        // You can add the elements here
    }

    public function onSubmit(Player $player, FormResponse $response): void {
        // You can modify the response here
    }

}
```

Then you can send the forms as you normally would with:

```
$player->sendForm(new ExampleForm());
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance74

Regular maintenance activity

Popularity28

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb0c782bc3784c590582164571753fb9af45d4b1393250cf7321eedcbd470652?d=identicon)[Sergittos](/maintainers/Sergittos)

---

Top Contributors

[![dresnite](https://avatars.githubusercontent.com/u/21067195?v=4)](https://github.com/dresnite "dresnite (40 commits)")[![Sergittos](https://avatars.githubusercontent.com/u/26655911?v=4)](https://github.com/Sergittos "Sergittos (10 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (3 commits)")[![pretendlake](https://avatars.githubusercontent.com/u/20545235?v=4)](https://github.com/pretendlake "pretendlake (2 commits)")

---

Tags

mcpeminecraftpmmppocketminepocketmine-mp-plugin

### Embed Badge

![Health badge](/badges/dresnite-easyui/health.svg)

```
[![Health](https://phpackages.com/badges/dresnite-easyui/health.svg)](https://phpackages.com/packages/dresnite-easyui)
```

###  Alternatives

[muqsit/invmenu

A PocketMine-MP virion to create and manage virtual inventories!

2225.4k1](/packages/muqsit-invmenu)[muqsit/simple-packet-handler

Handle specific data packets (virion for PMMP API 4.0.0)

417.8k3](/packages/muqsit-simple-packet-handler)[dktapps/pmforms

Form API library for PocketMine-MP plugins

532.6k1](/packages/dktapps-pmforms)[muqsit/asynciterator

A virion that simplifies writing tasks that traverse iterators

183.1k](/packages/muqsit-asynciterator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
