-
Notifications
You must be signed in to change notification settings - Fork 0
Announcement Configuration
This guide explains creating and editing Announcement Groups
These options define the properties for this anouncement group
{
"enabled": true,
"interval": 30,
"order": "RANDOM",
"requirements": {},
"discord": {},
"formatting": [],
"announcements": {}
}
Sets whether this group should be enabled for automatic announcments.
"enabled": true
The amount of time in seconds between each announcement of this group
"interval": 30
Determines the order that the announcements will be announced in. Currently available types: RANDOM
and SEQUENTIAL
"items": {}
Define requirements that must be met before any announcements in this group will be sent to the player. See Requirements for more information on requirements.
"requirements": { "example_requirement_1": { "type": "PERMISSION", "permission": "test.permission" } }
Options to control how, or if, Discord webhook messages are sent when announced. See the Discord Options section below.
"discord": { "webhook_url": "", "username": "Username", "avatar_url": "https://i.imgur.com/lFAGX4A.png", "content": "Text message. Up to 2000 characters. %message%", "embeds": [] }
A list of strings that will change the formatting of all chat message announcements. %message%
will be replaced with the announcement's message. The formatting will be copied for each line in the announcement message.
"formatting": [ "<red><b>! <red>Announcement <b>>> <gray>%message%" ]
A MAP of Announcements that can be sent out. Each entry needs its unique string identifier. See the Announcement Options section below.
"announcements": { "test": { "message": [], "title": {}, "action_bar": "", "sound": {} }, "test_2": { "message": [] } }
These options define how the announcements are displayed, when this specific announcement is announced.
"announcements": {
"test": {
"message": [
"Chat Message Line 1",
"Chat Message Line 2",
"Chat Message Line 3"
],
"title": {
"title": "Title Message",
"subtitle": "Subtitle Message",
"duration": 5,
"fade_in": 1,
"fade_out": 1
},
"action_bar": "Action Bar Message",
"sound": {
"sound": "minecraft:block.note_block.bell",
"volume": 1.0,
"pitch": 1.0
},
"discord": true
},
"test_2": {
"message": [
"Chat Message Line 1"
],
"discord": false
}
}
A list of strings that will be sent in the chat. If the formatting
option is defined, this two will be combined using the %message%
placeholder. See Formatting for more information on the usage.
"message": [ "Chat Message Line 1", "Chat Message Line 2", "Chat Message Line 3" ]
A title message is displayed in the center of the screen, with options for both the main-title and the sub-title.
"title": { "title": "Title Message", "subtitle": "Subtitle Message", "duration": 5, "fade_in": 1, "fade_out": 1 }
The large text part of a Title.
"title": "Title Message"
The small text part of a Title.
"subtitle": "Subtitle Message"
The amount of time in seconds that the Title is on the screen for, not including the fade in and out times.
"duration": 5
The amount of time in seconds that the Title takes to fade into the screen.
"fade_in": 1
The amount of time in seconds that the Title takes to fade out of the screen.
"fade_out": 1
An action bar message is displayed above the hotbar. It will only be displayed for a limited amount of time, which is not configurable.
"action_bar": "Action Bar Message"
A sound that will be played to the player.
"sound": { "sound": "minecraft:block.note_block.bell", "volume": 1.0, "pitch": 1.0 }
Resource location of a sound event.
"sound": "minecraft:block.note_block.bell"
The volume the sound is played at, between 0.0
and 1.0
.
"volume": 1.0
The pitch the sound is played at, between 0.0
and 1.0
.
"pitch": 1.0
Sets if this announcement will be sent as a Discord webhook, only if the webhook URL is set. Defaults to true
.
"discord": true
Requirements are a list of checks that must succeed for a GUI to open, Item to display, or Action to activate, depending on where it's used. A MAP of requirements must be listed that are checked when activated. A list of deny and success actions can then be defined that will activate when any requirement has failed or all have succeeded, respectively. Each entry in the requirements section must have a unique string identifier. See Requirement Types for the types and additonal options.
"requirements": {
"example_requirement_1": {
"type": "PERMISSION",
"permission": "test.permission"
}
}
The type of action that this entry is. Must be in full capitalization. A list of types can be found in Action Types.
"type": "MESSAGE"
The type of comparison that this requirement should do. The usage changes depending on the requirement used. See Comparison Types for more information. Defaults to == (equals) if not provided.
"comparison": "=="
Additional options are available depending on the type of action used. See Requirement Types for each type's additional options.
Identifier | Description | Options |
---|---|---|
PERMISSION | Check if the player has a permission | "permission": "<permission.node>" |
DIMENSION | Check if the player is in a dimension | "id": "<mod:id>" |
Identifier | PERMISSION/DIMENSION |
---|---|
== | Returns equality check |
!= | Returns opposite of equality check |
> | |
< | |
>= | |
<= |
Defines the formatting that announcement messages are sent as, when enabled. All options generally follow birdie0's Webhook Structure Guide.
"discord": {
"webhook_url": "",
"username": "Username",
"avatar_url": "https://i.imgur.com/lFAGX4A.png",
"content": "Text message. Up to 2000 characters. %message%",
"embeds": [
{
"author": {
"name": "SkiesAnnouncements",
"url": "https://www.github.com/pokeskies/skiesannouncements",
"icon_url": "https://i.imgur.com/lFAGX4A.png"
},
"title": "Title",
"url": "https://www.github.com/pokeskies/skiesannouncements",
"description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`",
"color": 15258703,
"fields": [
{
"name": "Text",
"value": "More text",
"inline": true
}
],
"thumbnail": {
"url": "https://i.imgur.com/lFAGX4A.png"
},
"image": {
"url": "https://i.imgur.com/lFAGX4A.png"
},
"footer": {
"text": "Woah! So cool! :smirk:",
"icon_url": "https://i.imgur.com/lFAGX4A.png"
}
}
]
}
Example Discord Webhook
A Discord Webhook URL. See Intro to Webhooks by Discord for a guide to creating a URL.
"webhook_url": ""
Sets the username of the Bot sending the message. Defaults to webhook name.
"username": "Username"
Sets the profile picture of the Bot sending the message. Defaults to the webhook image.
"avatar_url": "https://i.imgur.com/lFAGX4A.png"
The webhooks main message, outside of any embeds.
"content": "Text message. Up to 2000 characters. %message%"
A list of embeds that will be sent with the message.
"embeds": [ { "author": { "name": "SkiesAnnouncements", "url": "https://www.github.com/pokeskies/skiesannouncements", "icon_url": "https://i.imgur.com/lFAGX4A.png" }, "title": "Title", "url": "https://www.github.com/pokeskies/skiesannouncements", "description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`", "color": 15258703, "fields": [ { "name": "Text", "value": "More text", "inline": true } ], "thumbnail": { "url": "https://i.imgur.com/lFAGX4A.png" }, "image": { "url": "https://i.imgur.com/lFAGX4A.png" }, "footer": { "text": "Woah! So cool! :smirk:", "icon_url": "https://i.imgur.com/lFAGX4A.png" } } ]
An author object with multiple sub options that define the embeds author.
"author": { "name": "SkiesAnnouncements", "url": "https://www.github.com/pokeskies/skiesannouncements", "icon_url": "https://i.imgur.com/lFAGX4A.png" }
The name of the author in the embed.
"name": "SkiesAnnouncements"
The click URL for the author's name.
"url": "https://www.github.com/pokeskies/skiesannouncements"
The image for the author's profile picture in the embed.
"icon_url": "https://i.imgur.com/lFAGX4A.png"
The title of the embed.
"title": "Title"
The URL for the title of the embed.
"url": "https://www.github.com/pokeskies/skiesannouncements"
The main text description of the embed.
"description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`"
The color of the embed. Either in Decimal (11141120), or in Hexadecimal (#aa0000)
"color": 15258703
A list of field options for the embed.
"fields": [ { "name": "Text", "value": "More text", "inline": true } ]
The name of the field.
"name": "Text"
The value of the field.
"value": "More text"
Sets if the field will be displayed in-line. In-line fields are displayed on the same line, 3 per line, 4th+ will be moved to the next line.
"inline": true
Sets the thumbnail content for the embed.
"thumbnail": { "url": "https://i.imgur.com/lFAGX4A.png" }
The image URL of the thumbnail.
"url": "https://i.imgur.com/lFAGX4A.png"
Sets the image for the embed.
"image": { "url": "https://i.imgur.com/lFAGX4A.png" }
The image URL for the embed's image.
"url": "https://i.imgur.com/lFAGX4A.png"
The bottom footer for the embed.
"footer": { "text": "Woah! So cool! :smirk:", "icon_url": "https://i.imgur.com/lFAGX4A.png" }
The footer's text message.
"text": "Woah! So cool! :smirk:"
The image URL for the footer message.
"icon_url": "https://i.imgur.com/lFAGX4A.png"