Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| library:minedown:usage [2020/10/06 22:36] – Update version to 1.6.2 phoenix616 | library:minedown:usage [2025/06/16 11:38] (current) – Replace docs links to phoenix616.dev phoenix616 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== How to use it ====== | ====== How to use it ====== | ||
| - | The library' | + | The library' |
| - | ===== BungeeCord-chat API on Spigot | + | ===== MineDown using Adventure (e.g. on Paper or Velocity) |
| ```java | ```java | ||
| - | player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); | + | player.sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); |
| ``` | ``` | ||
| or with a static approach: | or with a static approach: | ||
| ```java | ```java | ||
| - | player.spigot().sendMessage(MineDown.parse(rawMessage, | + | player.sendMessage(MineDown.parse(rawMessage, |
| ``` | ``` | ||
| - | Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown/) for more | + | This is possible on any platform that implements |
| + | |||
| + | Take a look at the MineDown JavaDocs (provided through Maven) for more | ||
| detailed info on the library and the included classes. | detailed info on the library and the included classes. | ||
| - | ===== kyori-adventure on Spigot ===== | + | ===== On Spigot |
| ```java | ```java | ||
| Line 25: | Line 27: | ||
| BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, | BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, | ||
| ``` | ``` | ||
| - | Take a look at the [MineDown-adventure | + | Take a look at the [MineDown JavaDocs](https:// |
| + | detailed info on the library and the included classes. | ||
| + | |||
| + | ===== Legacy BungeeCord-chat API on Spigot ===== | ||
| + | |||
| + | ```java | ||
| + | player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); | ||
| + | ``` | ||
| + | or with a static approach: | ||
| + | ```java | ||
| + | player.spigot().sendMessage(MineDown.parse(rawMessage, | ||
| + | ``` | ||
| + | |||
| + | Take a look at the [MineDown Legacy JavaDocs](https:// | ||
| detailed info on the library and the included classes. | detailed info on the library and the included classes. | ||
| Line 46: | Line 61: | ||
| ==== Artifact ==== | ==== Artifact ==== | ||
| - | To be used with bungeecord-chat | + | === Adventure === |
| + | |||
| + | For usage in any platform that is supported by [kyori-adventure](https:// | ||
| ```xml | ```xml | ||
| < | < | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| - | < | + | < |
| < | < | ||
| </ | </ | ||
| Line 58: | Line 75: | ||
| ``` | ``` | ||
| - | For usage in any platform | + | Please note that on platforms that don't implement Adventure themselves (e.g. Spigot or Bungee) you need to provide an [adventure |
| + | |||
| + | === Legacy === | ||
| + | |||
| + | Legacy version to be used with bungeecord-chat in BungeeCord and Spigot-based servers: | ||
| ```xml | ```xml | ||
| < | < | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| - | < | + | < |
| < | < | ||
| </ | </ | ||
| </ | </ | ||
| ``` | ``` | ||
| - | Please note that you need to provide an [adventure | + | |
| + | <box red> | ||
| ==== Relocation ==== | ==== Relocation ==== | ||