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
You need to add the dependency to your build.gradle.
1
repositories {
2
maven { url = 'https://repo.mattstudios.me/artifactory/public' }
3
}
4
5
dependencies {
6
implementation "me.mattstudios:triumph-msg-adventure:{version}" // Replace version here
7
}
Copied!
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.
1
apply plugin: 'com.github.johnrengelman.shadow'
2
3
shadowJar {
4
relocate 'me.mattstudios.msg', '[YOUR PACKAGE].mfmsg'
5
}
Copied!
You need to add the dependency to your pom.xml.
1
<dependency>
2
<groupId>me.mattstudios</groupId>
3
<artifactId>triumph-msg-adventure</artifactId>
4
<version>{version}</version> <!-- replace version here -->
5
</dependency>
Copied!
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.
1
<plugin>
2
<groupId>org.apache.maven.plugins</groupId>
3
<artifactId>maven-shade-plugin</artifactId>
4
<version>3.1.1</version>
5
<configuration>
6
<relocations>
7
<relocation>
8
<pattern>me.mattstudios.msg</pattern>
9
<shadedPattern>[YOUR PACKAGE].mfmsg</shadedPattern> <!-- Replace package here here -->
10
</relocation>
11
</relocations>
12
</configuration>
13
<executions>
14
<execution>
15
<phase>package</phase>
16
<goals>
17
<goal>shade</goal>
18
</goals>
19
</execution>
20
</executions>
21
</plugin>
Copied!

Using it

There are some major diferences between the bukkit version and this version of the lib. For starters, you use AdventureMessage instead of BukkitMessage. The lib also just parses the text to an Adventure component. You will have to use Adventure to make it into a BossBar, Title or SubTitle. You will also have to use Adventure's audiences to deliver the messages.
1
final AdventureMessage message = AdventureMessage.create();
Copied!
Last modified 2mo ago
Copy link
Contents
Using it