Skip to content

Commit 78ec1a8

Browse files
docs: Add api usage for FancyDialogs
1 parent 4190946 commit 78ec1a8

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

docs/src/fancydialogs/api/getting-started.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,21 @@ dependencies {
4141

4242
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.
4343

44-
## Create a new dialog
44+
## Show a notice dialog
4545

46-
TODO
46+
```java
47+
new NoticeDialog("title", "message").show(player);
48+
// or
49+
NoticeDialog.show(player, "message");
50+
```
51+
52+
## Show a confirmation dialog
53+
54+
```java
55+
CompletableFuture<Boolean> confirmed = new ConfirmationDialog("title", "question", "confirmText", "cancelText").ask(player);
56+
// or
57+
boolean confirmed = ConfirmationDialog.ask(player, "question");
58+
```
4759

4860
## JavaDocs and help
4961

docs/src/fancydialogs/fancydialogs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Common use cases are:
6161
- [X] Open dialogs for players (via commands or code)
6262
- [X] Welcome dialog for new players
6363
- [X] FancyNpcs integration (open_dialog action)
64+
- [X] Confirmation and notice dialogs (API)
6465
- [ ] Add support for the quick action hotkey
6566
- [ ] Add tutorial features
6667
- [ ] Add input controls

0 commit comments

Comments
 (0)