Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
library:minedown:usage [2020/09/15 14:20] – created phoenix616 | library:minedown:usage [2020/11/23 18:23] (current) – [Artifact] Increment version phoenix616 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to use it ====== | ====== How to use it ====== | ||
- | The library' | + | The library' |
+ | |||
+ | ===== BungeeCord-chat API on Spigot ===== | ||
- | E.g. you can use it like this in your Spigot plugin: | ||
```java | ```java | ||
player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); | player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); | ||
Line 13: | Line 14: | ||
Take a look at the [MineDown JavaDocs](https:// | Take a look at the [MineDown JavaDocs](https:// | ||
+ | detailed info on the library and the included classes. | ||
+ | |||
+ | ===== kyori-adventure on Spigot ===== | ||
+ | |||
+ | ```java | ||
+ | BukkitAudiences.create(plugin).player(player).sendMessage(new MineDown(rawMessage).replace(replacements).toComponent()); | ||
+ | ``` | ||
+ | or with a static approach: | ||
+ | ```java | ||
+ | BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, | ||
+ | ``` | ||
+ | Take a look at the [MineDown-adventure JavaDocs](https:// | ||
detailed info on the library and the included classes. | detailed info on the library and the included classes. | ||
Line 39: | Line 52: | ||
< | < | ||
< | < | ||
- | < | + | < |
< | < | ||
</ | </ | ||
Line 51: | Line 64: | ||
< | < | ||
< | < | ||
- | < | + | < |
< | < | ||
</ | </ | ||
</ | </ | ||
``` | ``` | ||
- | Please note that you need to provide an [adventure platform library](https:// | + | Please note that you need to provide an [adventure platform library](https:// |
==== Relocation ==== | ==== Relocation ==== |