Messages
Last updated
Last updated
To fully understand this documentation, you need to be familiar with how a YAML configuration file works. Without this knowledge, the following explanations may be difficult to follow.
You can use the for your messages, which allows you to add extensive customization options and functionality.
Here is a site that allows you to preview your messages:
You can also set global variables for all messages in the config.yml
file, such as <success>
and <error>
.
There are various ways to configure the messages, with the most common being a simple message, like this:
However, there are other types of messages, as well as the ability to send multiple messages simultaneously.
The tchat
type is the most common message type, allowing you to send messages directly to the player's chat. With this type, each message will include a prefix. If you want to send a message without a prefix, you must use the type. Note that when you send a list of messages, only the first message will have a prefix; in the example below, module-disable
will have a prefix, but rules
will not.
You have the option to send either a single message or multiple messages, like this:
You don’t need to specify the type for tchat
; it will be used by default.
The action
type allows you to send a message to the player's action bar. You need to specify the type like this:
The without_prefix
type is used to send a message without a prefix. By default, all messages will include a prefix. To remove the prefix, you need to specify the type like this:
This type does not send the message.
To send a message that will be centered in your chat, you need to specify the type like this:
To create a bossbar, you need to do it like this:
To send a title to the player, you must specify the title like this:
You can send multiple messages at the same time, regardless of the type of message. Simply follow the documentation and apply the same example format to all message types. Here’s how to send multiple messages simultaneously:
You must send a list with the type and corresponding configuration. The TCHAT
type will always be the default; for other types, you are required to specify them explicitly.
The bossbar uses the MiniMessage API. To find the values for , or please refer to the MiniMessage documentation.