Skip to content

QuiltServerTools/MCDiscordReserializer

 
 

Repository files navigation

MCDiscordReserializer

Maven Central Sonatype (Snapshots)

A library for transcoding between Minecraft and Discord.

Minecraft text is represented using Kyori's Adventure (compatible with 4.x.x).

Discord text is represented using Java Strings (not relying on any specific Discord library) and is translated using a fork of Discord's SimpleAST, here.

Dependency information

Version

Adventure Version MCDiscordReserializer version Maintained
4.x.x 4.x.x

Maven

<dependencies>
    <dependency>
        <groupId>dev.vankka</groupId>
        <artifactId>mcdiscordreserializer</artifactId>
        <version>4.3.0</version>
    </dependency>
</dependencies>

Gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation 'dev.vankka:mcdiscordreserializer:4.3.0'
}

Basic usage

// For Minecraft -> Discord translating
String output = DiscordSerializer.INSTANCE.serialize(TextComponent.of("Bold").decoration(TextDecoration.BOLD, true));

// For Discord -> Minecraft translating
TextComponent output = MinecraftSerializer.INSTANCE.serialize("**Bold**");

About

A library for transcoding between Minecraft and Discord.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages