# B+ style Chat Formatting

## What is this?

Legacy formatting in minecraft allows for colors and various formats to be applied to chat. However, it does not provide any way to add hover or click actions. B+ allows users to add hover and click actions while also providing support for legacy chat. This is done through the BrickBoard API's [ChatMessage](https://github.com/BananaPuncher714/BrickBoard/blob/master/io/github/bananapuncher714/brickboard/api/chat/ChatMessage.java).

## Cool, so how do I use this?

You can specify when you want to add a hover/click action by using <>. Inside of that, you can use {} for hover text, and () for click action stuff. Here's an example:

`This is a <clickable link{Click me}(oPeN_uRl:https://www.github.com)>. It brings you to Github`

The `clickable link` part is what gets displayed. The text inside the curly brackets {} is what appears when the text is hovered over, and the text inside the parentheses make up a click action. The actions and text do not have to appear in any specific order, as these all display the same output:

```
<clickable link{Click me}(oPeN_uRl:https://www.github.com)>
<clickable link(oPeN_uRl:https://www.github.com){Click me}>
<{Click me}clickable link(oPeN_uRl:https://www.github.com)>
<clickable{Click me} l(oPeN_uRl:https://www.github.com)ink>
<clickable link(oPeN_uRl:https://www.github.com)>
<clickable link{Click me}>
```

The only difference is with the last 2, where the former only has the click action, and the latter only has the hover action. In order to have >, ), or }, you may need to use a backslash to escape them. For the click action, it is formatted as `(`**`action`**`:text)`where the action must be either `OPEN_URL`, `RUN_COMMAND`, or `SUGGEST_COMMAND`.


---

# 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://bananapuncher714.gitbook.io/brickboard/b+-style-chat-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.
