📖Messages

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 MiniMessage format for your messages, which allows you to add extensive customization options and functionality.

Here is a site that allows you to preview your messages: https://webui.advntr.dev/

You can also set global variables for all messages in the config.yml file, such as <success> and <error>.

Configurations

There are various ways to configure the messages, with the most common being a simple message, like this:

module-disable: "<error>The &f%name% <error>module is disabled. You cannot use this command."

However, there are other types of messages, as well as the ability to send multiple messages simultaneously.

TCHAT

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 WITHOUT_PREFIX 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:

module-disable: "<error>The &f%name% <error>module is disabled. You cannot use this command."
rules:
  - "#ffd353ℹ sᴇʀᴠᴇʀ ʀᴜʟᴇs#3f3f3f:"
  - "#3f3f3f• &7Respect all players and staff."
  - "#3f3f3f• &7No grieging or stealing."
  - "#3f3f3f• &7No cheating or hacking."
  - "#3f3f3f• &7Keep chat clean and respectful."
  - "#3f3f3f• &7No spamming or advertising."

You don’t need to specify the type for tchat; it will be used by default.

ACTION

The action type allows you to send a message to the player's action bar. You need to specify the type like this:

teleport-message:
  type: ACTION
  message: "&7Teleporting in #0EEA93%seconds% &7seconds, you must not move."

WITHOUT_PREFIX

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:

command-baltop:
  type: WITHOUT_PREFIX
  message: "#00f986#%position% &f%name%&8: %amount%"

NONE

This type does not send the message.

CENTER

To send a message that will be centered in your chat, you need to specify the type like this:

rules:
  type: CENTER
  messages:
    - "#ffd353ℹ sᴇʀᴠᴇʀ ʀᴜʟᴇs#3f3f3f:"
    - "#3f3f3f• &7Respect all players and staff."
    - "#3f3f3f• &7No grieging or stealing."
    - "#3f3f3f• &7No cheating or hacking."
    - "#3f3f3f• &7Keep chat clean and respectful."
    - "#3f3f3f• &7No spamming or advertising."

BOSSBAR

To create a bossbar, you need to do it like this:

example:
  type: BOSSBAR
  text: "BossBar Example"
  color: WHITE
  overlay: PROGRESS
  flags:
    - DARKEN_SCREEN
    - PLAY_BOSS_MUSIC
    - CREATE_WORLD_FOG
  duration: 100 # 100 ticks, 5s
  static: false

The bossbar uses the MiniMessage API. To find the values for color, overlay or flags please refer to the MiniMessage documentation.

TITLE

To send a title to the player, you must specify the title like this:

example:
  type: TITLE
  title: "Title example"
  subtitle: "Subtitle example"
  start: 100 # 100ms, 0.1s
  time: 2800 # 2800ms, 2.8s
  end: 100 # 100ms, 0.1s

Multi messages

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:

teleport-message-spawn:
  - message: "&7Teleporting in #0EEA93%seconds% &7seconds, you must not move."
  - type: ACTION
    message: "&7Teleporting in #0EEA93%seconds% &7seconds, you must not move."

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.


Files

English

https://github.com/Maxlego08/zEssentials/blob/master/Essentials/src/main/resources/messages/messages.yml

Français

https://github.com/Maxlego08/zEssentials/blob/master/Essentials/src/main/resources/messages/messages_fr.yml

Italiano

https://github.com/Maxlego08/zEssentials/blob/master/Essentials/src/main/resources/messages/messages_it.yml

German

https://github.com/Maxlego08/zEssentials/blob/master/Essentials/src/main/resources/messages/messages_de.yml

Last updated