FancyDialogsAPI
Getting Started
How to get started with the FancyDialogs API
Include the API in your project
To include the FancyNPCs API in your project, you need to add the following dependency to your build.gradle.kts or pom.xml file.
Latest version: latest
Gradle:
repositories {
maven("https://repo.fancyinnovations.com/releases")
}dependencies {
compileOnly("de.oliver:FancyDialogs:1.0.1")
}Maven:
<repository>
<id>fancyinnovations-releases</id>
<name>FancyInnovations Repository</name>
<url>https://repo.fancyinnovations.com/releases</url>
</repository><dependency>
<groupId>de.oliver</groupId>
<artifactId>FancyDialogs</artifactId>
<version>1.0.1</version>
<scope>provided</scope>
</dependency>Replace 1.0.1 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.
Show a notice dialog
new NoticeDialog("title", "message").show(player);
// or
NoticeDialog.show(player, "message");Show a confirmation dialog
new ConfirmationDialog("Are you sure you want to reload the configuration?")
.withTitle("Confirm reload")
.withOnConfirm(() -> player.sendMessage("Reloading configuration..."))
.withOnCancel(() -> player.sendMessage("Reload cancelled."))
.ask(player);JavaDocs and help
You can find the JavaDocs for the FancyDialogs API here.
Join the FancyInnovations Discord for help and support. There is a dedicated channel for help about the api (#dialogs-api).