A small Java Library for converting Markdown text to formatted text Components for use in-game.
- Java 100%
| src/main/java/net/mathias2246/mdtominecraft | ||
| .gitignore | ||
| LICENSE | ||
| pom.xml | ||
| README.md | ||
Markdown to Minecraft text
This is a simple Java library to convert Markdown text to Minecraft usable adventure components with formatting.
Note
This conversion tool is incomplete and will not support all features of Markdown. E.g. HTML tags, images, or references inside the text.
Add to your projects
Copy this into your maven pom.xml under the dependencies section:
<dependency>
<groupId>net.mathias2246</groupId>
<artifactId>markdown-to-minecraft</artifactId>
<version>0.1.0</version>
</dependency>
Usage
There is one class called ComponentRender.
The ComponentRender class implements commonmarks AbstractVisitor.
You can use ComponentRender.render(markdownString) to directly parse and convert Markdown to a Component .
Note
This library currently only supports one formatting for every markdown conversion, but i plan to change that.