fancydialogs: Update default dialogs

This commit is contained in:
Oliver
2025-06-17 18:42:44 +02:00
parent 96ae8814dc
commit 42894ee8dc
5 changed files with 101 additions and 5 deletions

View File

@@ -8,3 +8,9 @@ icon: image
The following examples show how to use FancyDialogs in different ways. They are meant to give you an idea of what you can do with the plugin. The following examples show how to use FancyDialogs in different ways. They are meant to give you an idea of what you can do with the plugin.
Almost all examples are made by the community. If you have a nice example that you want to share, feel free come to our discord server and show it to us. Almost all examples are made by the community. If you have a nice example that you want to share, feel free come to our discord server and show it to us.
![Provided by oliver](../static/fancydialogs/examples/oliver-welcome_to_fd.png)
![Provided by oliver](../static/fancydialogs/examples/oliver-welcome.png)
![Provided by oliver](../static/fancydialogs/examples/oliver-quick_actions.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -22,21 +22,111 @@ public class DefaultDialogs {
} }
dialogsFolder.mkdirs(); dialogsFolder.mkdirs();
welcomeToFancyDialogsDialog();
welcomeDialog(); welcomeDialog();
quickActions();
}
private static void welcomeToFancyDialogsDialog() {
DialogData data = new DialogData(
"welcome_to_fancydialogs",
"<u><b><color:#ff7300>Welcome to FancyDialogs!</color></b></u>",
false,
List.of(
new DialogBodyData("<color:#ffd199><i>The simple and lightweight dialog plugin for your server!<i></color>"),
new DialogBodyData(""),
new DialogBodyData("This dialog is a demonstration of how to use FancyDialogs to create interactive and user-friendly dialogs."),
new DialogBodyData("FancyDialogs supports <rainbow>MiniMessages</rainbow> and PlaceholderAPI"),
new DialogBodyData("Explore more features in the documentation (<click:open_url:'https://docs.fancyinnovations.com/fancyholograms/'><u>click here</u></click>)."),
new DialogBodyData("<gradient:#ff7300:#ffd199:#ff7300>Enjoy using FancyDialogs :D</gradient>")
),
List.of(
new DialogButton(
"<color:#ff4f19>Close</color>",
"<color:#ff4f19>Enjoy using FancyDialogs</color>",
"close_dialog"
),
new DialogButton(
"<color:#ffd000>Run command</color>",
"<color:#ff4f19>Click to give yourself an apple :)</color>",
"run_command:/give {player} apple 1"
)
)
);
register(data);
} }
private static void welcomeDialog() { private static void welcomeDialog() {
DialogData data = new DialogData( DialogData data = new DialogData(
"welcome_to_fancydialogs_dialog", "welcome",
"Welcome to FancyDialogs", "<b><color:#00ff5e>Welcome to {server_name}!</color></b>",
false, false,
List.of( List.of(
new DialogBodyData("Welcome to FancyDialogs! This is a sample dialog to get you started.") new DialogBodyData("<color:#a8ffb4><i>The best Minecraft server on earth!<i></color>"),
new DialogBodyData(""),
new DialogBodyData("We are glad to have you here!"),
new DialogBodyData("If you have any questions, feel free to ask our staff members.")
), ),
List.of( List.of(
new DialogButton( new DialogButton(
"Close", "<color:red>Read the rules</color>",
"Close the dialog", "<color:red>Click to read our rules!</color>",
"message:<click:open_url:'{LINK TO RULES}'>Visit our rules</click>!"
),
new DialogButton(
"<color:#00ff5e>Start playing</color>",
"<color:#00ff5e>Click to start playing!</color>",
"close_dialog"
),
new DialogButton(
"<color:#1787ff>Join our Discord</color>",
"<color:#1787ff>Click to join our Discord server!</color>",
"message:<click:open_url:'{LINK TO DISC SERVER}'>Join our Discord server</click>!"
),
new DialogButton(
"<color:#ffee00>Visit our website</color>",
"<color:#ffee00>Click to visit our website!</color>",
"message:<click:open_url:'{LINK TO WEBSITE}'>Visit our website</click>!"
)
)
);
register(data);
}
private static void quickActions() {
DialogData data = new DialogData(
"quick_actions",
"<u><b><color:gold>Quick Actions</color></b></u>",
false,
List.of(
new DialogBodyData("Here you can quickly access some of the most important features of our server.")
),
List.of(
new DialogButton(
"<color:#ffee00>Visit our website</color>",
"<color:#ffee00>Click to visit our website!</color>",
"message:<click:open_url:'{LINK TO WEBSITE}'>Visit our website</click>!"
),
new DialogButton(
"<color:#ffee00>Read the rules</color>",
"<color:#ffee00>Click to read our rules!</color>",
"message:<click:open_url:'{LINK TO RULES}'>Visit our rules</click>!"
),
new DialogButton(
"<color:#ffee00>Join our Discord</color>",
"<color:#ffee00>Click to join our Discord server!</color>",
"message:<click:open_url:'{LINK TO DISCORD}'>Join our Discord server</click>!"
),
new DialogButton(
"<color:#ffee00>Support us</color>",
"<color:#ffee00>Click to support us!</color>",
"message:<click:open_url:'{LINK TO SUPPORT}'>Support us</click>!"
),
new DialogButton(
"<color:red>Close</color>",
"<color:red>Click to close this dialog!</color>",
"close_dialog" "close_dialog"
) )
) )