====== How to use it ======
The library's main API access is through the [MineDown.class](https://docs.phoenix616.dev/minedown/de/themoep/minedown/MineDown.html) and its parse methods.
===== MineDown using Adventure (e.g. on Paper or Velocity) =====
```java
player.sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());
```
or with a static approach:
```java
player.sendMessage(MineDown.parse(rawMessage, replacements));
```
This is possible on any platform that implements the [Adventure Component API](https://github.com/KyoriPowered/adventure)!
Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown-adventure/) for more
detailed info on the library and the included classes.
===== On Spigot using adventure-platform =====
```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, replacements));
```
Take a look at the [MineDown JavaDocs](https://docs.minebench.de/minedown-adventure/) for more
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, replacements));
```
Take a look at the [MineDown Legacy JavaDocs](https://docs.minebench.de/minedown/) for more
detailed info on the library and the included classes.
===== Include it into your plugin =====
You can easily include this library into your plugin by using maven.
Make sure to relocate it into your plugin's package!
==== Repository ====
```xml
minebench-repo
https://repo.minebench.de/
```
==== Artifact ====
=== Adventure ===
For usage in any platform that is supported by [kyori-adventure](https://github.com/KyoriPowered/adventure)/has an [adventure-platform adapter](https://github.com/KyoriPowered/adventure-platform):
```xml
de.themoep
minedown-adventure
1.7.3-SNAPSHOT
compile
```
Please note that on platforms that don't implement Adventure themselves (e.g. Spigot or Bungee) you need to provide an [adventure platform library](https://github.com/KyoriPowered/adventure-platform) yourself in that case. (Both Paper and Velocity provide adventure)
=== Legacy ===
Legacy version to be used with bungeecord-chat in BungeeCord and Spigot-based servers:
```xml
de.themoep
minedown
1.7.1-SNAPSHOT
compile
```
⚠️ Please note that usage of bungeecord-chat is deprecated and that only the adventure implementation will receive new features going forward!
==== Relocation ====
```xml
maven-shade-plugin
3.1.0
de.themoep.minedown
your.package.path.libraries.minedown
package
shade
```
===== Alternative to shading =====
Alternatively you can also directly depend on my [MineDownPlugin](https://github.com/Phoenix616/MineDownPlugin/)
instead of shading in this library! MineDownPlugin includes a non-relocated version of this library.