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 [2024/08/11 12:36] (current) – Update to focus on adventure phoenix616 | ||
---|---|---|---|
Line 3: | Line 3: | ||
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:// | + | This is possible on any platform that implements the [Adventure Component API](https:// |
+ | |||
+ | Take a look at the [MineDown JavaDocs](https:// | ||
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 ==== |