Only put the api in the src of your plugin and use it :)
You will find an example in Example\Main.php
DialogueHandler::register()
$dialogue = DialogueAPI::create("DialogueTest", "Title", "Here's the dialogue",
[
DialogueButton::create("I agree")
->setHandler(function (Player $player, string $buttonName): void {
$player->sendMessage("You've selected $buttonName.");
}),
DialogueButton::create("Yanoox the best")
->setHandler(function (Player $player, string $buttonName): void {
$player->sendMessage("Go starify his repository");
})]);
Note that for this version of DialogueUIAPI, the entity is not necessary.
$dialogue->displayTo([$player], $entity);
//or
$dialogue->displayTo([$player]);
Browse the api to learn more