mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
docs: Add api usage for FancyDialogs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user