# Messages Formatting

Welcome to the BedHome plugin message configuration guide! In this guide, you'll learn how to customize the messages that are displayed to players using your BedHome plugin. By personalizing these messages, you can provide a more engaging and informative experience for your Minecraft server players.

### MiniMessage

Plugin supports MiniMessage formatting. If you want to use HEX, Gradients, or Rainbow Effects, check[ here](https://docs.advntr.dev/minimessage/format.html).

### Complex Messages

{% hint style="info" %}
Available since plugin version 1.2
{% endhint %}

Tired of having your messages confined to just the chat? With Complex Messages, you can send ActionBars, Titles, and even play sounds through simple plugin configuration. It's that easy! 😄

#### Chat

If you want your message to be sent only in the chat, simply type it as usual. For example, let's say you want to modify the message displayed when a player is waiting for a home teleport. The default message looks like this:

```yaml
teleportingWarmup: '<gray>Teleport in {time} seconds'
```

But if you want to play an additional sound, you need to enclose your message in `<chat>` tags like this:

```yaml
teleportingWarmup: '<chat><gray>Teleport in {time} seconds</chat><sound>ui.button.click</sound>'
```

A message formatted in this way will be displayed in the chat and play a sound!

#### Action Bar

If you want your message to appear as an Action Bar above the player's inventory, use the following formatting:

```yaml
teleportingWarmup: '<actionbar><gray>Teleport in {time} seconds</actionbar>'
```

This message will be displayed for 3 seconds. If you want the message to stay there longer, you can add a `duration` argument to specify how long it should be displayed (duration is in seconds).

```yaml
teleportingWarmup: '<actionbar duration=5><gray>Teleport in {time} seconds</actionbar>'
```

This message will be displayed for 5 seconds.

#### Title and Subtitle

If you want to display large messages to the player, use the `<title>` tag. Example of a regular Title:

```yaml
teleportingWarmup: '<title><gray>Teleport in {time} seconds</title>'
```

You can also add a Subtitle beneath it by using  between the title and subtitle text.

```yaml
teleportingWarmup: '<title><red>(!)\n<gray>Teleport in {time} seconds</title>'
```

Want to send a Title for a specific duration? No problem! Add the appropriate arguments:

* `fadeIn`: The time in seconds for the message to fade in.
* `stay`: The time in seconds for how long the message will stay.
* `fadeOut`: The time in seconds for the message to fade out.

You can apply them like this:

```yaml
teleportingWarmup: '<title fadeIn=1 stay=8 fadeOut=1><red>(!)\n<gray>Teleport in {time} seconds</title>'
```

This Title will fade in within 1 second, stay for 8 seconds, and fade out within 1 second.

#### Sounds

Add life to your messages by playing sounds for your players.

You can find a list of sounds [here](https://example.com/sound-list).

Using them is incredibly simple:

```yaml
teleportingWarmup: '<chat><gray>Teleport in {time} seconds</chat><sound>ui.button.click</sound>'
```

Just place the desired sound between the `<sound>` tags, and that's it! 🎵


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pqdev.gitbook.io/docs/plugin-usage/messages-formatting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
