**This is an old revision of the document!**

How to use it

The library's main API access is through the MineDown.class and its parse methods.

BungeeCord-chat API on Spigot

snippet.java
player.spigot().sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());

or with a static approach:

snippet.java
player.spigot().sendMessage(MineDown.parse(rawMessage, replacements));

Take a look at the MineDown JavaDocs for more detailed info on the library and the included classes.

kyori-adventure on Spigot

snippet.java
BukkitAudiences.create(plugin).player(player).sendMessage(new MineDown(rawMessage).replace(replacements).toComponent());

or with a static approach:

snippet.java
BukkitAudiences.create(plugin).player(player).sendMessage(MineDown.parse(rawMessage, replacements));

Take a look at the MineDown JavaDocs 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

snippet.xml
<repositories>
    <repository>
        <id>minebench-repo</id>
        <url>https://repo.minebench.de/</url>
    </repository>
</repositories>

Artifact

To be used with bungeecord-chat in BungeeCord and Spigot-based servers:

snippet.xml
<dependencies>
    <dependency>
        <groupId>de.themoep</groupId>
        <artifactId>minedown</artifactId>
        <version>1.6.1-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

For usage in any platform that is supported by kyori-adventure:

snippet.xml
<dependencies>
    <dependency>
        <groupId>de.themoep</groupId>
        <artifactId>minedown-adventure</artifactId>
        <version>1.6.1-SNAPSHOT</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

Please note that you need to provide an adventure platform library yourself in that case. (Unless you are on Velocity or some other server which provides it)

Relocation

snippet.xml
<build>
    <plugins>
        <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <relocations>
                    <relocation>
                        <pattern>de.themoep.minedown</pattern>
                        <shadedPattern>your.package.path.libraries.minedown</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Alternative to shading

Alternatively you can also directly depend on my MineDownPlugin instead of shading in this library! MineDownPlugin includes a non-relocated version of this library.