mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialogs: Update README.md and add dialog examples
This commit is contained in:
42
plugins/fancydialogs/dialog-exmaples/dialog-list.json
Normal file
42
plugins/fancydialogs/dialog-exmaples/dialog-list.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"type": "dialog_list",
|
||||
"title": "Dialog List Dialog",
|
||||
"body": [
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "Welcome to the server! Please read the rules carefully.",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "The rules are: blah blah blah.",
|
||||
"width": 400
|
||||
}
|
||||
],
|
||||
"dialogs": [
|
||||
{
|
||||
"type": "notice",
|
||||
"title": "Rules",
|
||||
"external_title": "Go to rules dialog",
|
||||
"body": [
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "Some important information 1.",
|
||||
"width": 200
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "notice",
|
||||
"title": "Notice Dialog 2",
|
||||
"external_title": "Go to dialog 2",
|
||||
"body": [
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "ome important information 2.",
|
||||
"width": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
42
plugins/fancydialogs/dialog-exmaples/multi-action.json
Normal file
42
plugins/fancydialogs/dialog-exmaples/multi-action.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"type": "multi_action",
|
||||
"title": "Multi Action Dialog",
|
||||
"body": [
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "Welcome to the server! Please read the rules carefully.",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "The rules are: blah blah blah.",
|
||||
"width": 400
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"label": "Action 1",
|
||||
"id":"whatever",
|
||||
"on_submit": {
|
||||
"type": "command_template",
|
||||
"template": "tellraw @a '$(example) $(extra1) $(extra2)'"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Action 2",
|
||||
"id":"whatever2",
|
||||
"on_submit": {
|
||||
"type": "command_template",
|
||||
"template": "tellraw @a '$(example) $(extra1) $(extra2)'"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Action 3",
|
||||
"id":"whatever3",
|
||||
"on_submit": {
|
||||
"type": "command_template",
|
||||
"template": "tellraw @a '$(example) $(extra1) $(extra2)'"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
24
plugins/fancydialogs/dialog-exmaples/notice.json
Normal file
24
plugins/fancydialogs/dialog-exmaples/notice.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"type": "notice",
|
||||
"title": "Notice Dialog",
|
||||
"body": [
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "Welcome to the server! Please read the rules carefully.",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"type": "plain_message",
|
||||
"contents": "The rules are: blah blah blah.",
|
||||
"width": 400
|
||||
}
|
||||
],
|
||||
"action": {
|
||||
"label": "Understood!",
|
||||
"id":"whatever",
|
||||
"on_submit": {
|
||||
"type": "command_template",
|
||||
"template": "tellraw @a '$(example) $(extra1) $(extra2)'"
|
||||
}
|
||||
}
|
||||
}
|
||||
43
plugins/fancydialogs/dialog-exmaples/simple-input-form.json
Normal file
43
plugins/fancydialogs/dialog-exmaples/simple-input-form.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"type": "simple_input_form",
|
||||
"title": "Simple Input Form Dialog",
|
||||
"inputs": [
|
||||
{
|
||||
"type":"text",
|
||||
"label": "Text input",
|
||||
"key": "key1"
|
||||
},
|
||||
{
|
||||
"type":"boolean",
|
||||
"label": "Checkbox",
|
||||
"key": "key2"
|
||||
},
|
||||
{
|
||||
"type": "number_range",
|
||||
"label": "Number Range",
|
||||
"start": 50.0,
|
||||
"end": 420.0,
|
||||
"steps": 5,
|
||||
"initial": 200.0,
|
||||
"key": "key2"
|
||||
},
|
||||
{
|
||||
"type": "single_option",
|
||||
"label": "Single Option",
|
||||
"options": [
|
||||
{"id": "opt1", "display": "Option 1", "initial": true},
|
||||
{"id": "opt1", "display": "Option 2"},
|
||||
{"id": "opt1", "display": "Option 3"}
|
||||
],
|
||||
"key": "key3"
|
||||
}
|
||||
],
|
||||
"action": {
|
||||
"label": "Create!",
|
||||
"id":"whatever",
|
||||
"on_submit": {
|
||||
"type": "command_template",
|
||||
"template": "tellraw @a '$(example) $(extra1) $(extra2)'"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<div align="center">
|
||||
|
||||

|
||||

|
||||
|
||||
[](https://papermc.io/software/folia)
|
||||
[](https://discord.gg/ZUgYCEJUEx)
|
||||
|
||||
Reference in New Issue
Block a user