Adventure

I recommend using adventure over the bukkit version of this lib.

MF-MSG now supports Kyori's Adventure. Which allows you to use the lib on many other platforms and has all the benefits of using Adventure.

Gradle
Maven
Gradle

You need to add the dependency to your build.gradle.

repositories {
maven { url = 'https://repo.mattstudios.me/artifactory/public' }
}
dependencies {
implementation "me.mattstudios:mf-msg-adventure:{version}" // Replace version here
}

In order to include the lib in your project, you need to add shadowJar plugin build.gradle. Replace [YOUR PACKAGE]with your plugin's package, for example me.myplugin.plugin.

apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
relocate 'me.mattstudios.mfmsg', '[YOUR PACKAGE].mfmsg'
}
Maven

You need to add the dependency to your pom.xml.

<dependency>
<groupId>me.mattstudios</groupId>
<artifactId>mf-message-adventure</artifactId>
<version>{version}</version> <!-- replace version here -->
</dependency>

In order to include the framework in your project, you need to add the following to your pom.xml, in the plugins section. Replace [YOUR PACKAGE]with your plugin's package, for example me.myplugin.plugin.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<relocations>
<relocation>
<pattern>me.mattstudios.mfmsg</pattern>
<shadedPattern>[YOUR PACKAGE].mfmsg</shadedPattern> <!-- Replace package here here -->
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>

Using it

Everything is the same as the bukkit version of the lib. Only change is that instead of BukkitMessage, it's AdventureMessage.

final AdventureMessage message = AdventureMessage.create();