UIFormAPI

UIFormAPI 1.0.0

It allows you to use .addHandler(e -> {}) to add an action handler to the forms (an event).

Code:
FormAPI.customWindowForm("login", "Custom Form")
                .addInput("username", "Username", "Enter your username")
                .addInput("password", "Password", "Enter your password")
                .addHandler((e) -> System.out.println('Variable e is an instance of CustomFormSubmitEvent'))
                .sendTo((Player) sender);
Top