docs: Add api usage for FancyDialogs

This commit is contained in:
Oliver
2025-06-17 20:31:12 +02:00
parent 41909461d8
commit 78ec1a8ba9
2 changed files with 15 additions and 2 deletions

View File

@@ -41,9 +41,21 @@ dependencies {
Replace `VERSION` with the version of the API you want to use. You can find the latest version on the download pages or in the GitHub releases.
## Create a new dialog
## Show a notice dialog
TODO
```java
new NoticeDialog("title", "message").show(player);
// or
NoticeDialog.show(player, "message");
```
## Show a confirmation dialog
```java
CompletableFuture<Boolean> confirmed = new ConfirmationDialog("title", "question", "confirmText", "cancelText").ask(player);
// or
boolean confirmed = ConfirmationDialog.ask(player, "question");
```
## JavaDocs and help

View File

@@ -61,6 +61,7 @@ Common use cases are:
- [X] Open dialogs for players (via commands or code)
- [X] Welcome dialog for new players
- [X] FancyNpcs integration (open_dialog action)
- [X] Confirmation and notice dialogs (API)
- [ ] Add support for the quick action hotkey
- [ ] Add tutorial features
- [ ] Add input controls