Skip to content

Getting Started (Markdown)

Aram edited this page Nov 20, 2024 · 6 revisions

Getting Started with Markdown Support

Overview

The MarkdownParser in BlueLib introduces support for Markdown formatting in Minecraft, allowing for enhanced text styling options such as bold, italic, strikethrough, and Underline. By default, Markdown support is enabled, providing modders and users a seamless way to integrate formatted text into their Minecraft mods or experiences.

This feature ensures flexibility with options to disable Markdown entirely or disable specific elements of it based on the requirements of your mod or project.

Features

Supported Markdown Elements

As of version 1.1.0, the following Markdown elements are supported:

  • Bold: **text**
  • Italic: *text*
  • Strikethrough: ~~text~~
  • Underline: __text__

Note: Currently, the Markdown prefix/suffix syntax is not customizable. However, this feature is planned for future updates.

Disabling Markdown

Markdown can be toggled either globally or for individual elements:

Disabling Markdown Globally

To disable Markdown entirely, use:

MarkdownParser.disableMarkdown();

Disabling Specific Markdown Elements

To disable specific Markdown elements, use the following methods:

MarkdownParser.disableMarkdownFor.Bold();
MarkdownParser.disableMarkdownFor.Italic();
MarkdownParser.disableMarkdownFor.Underline();
MarkdownParser.disableMarkdownFor.Strikethrough();

You can also combine these for greater control. For example, to disable both bold and italic, use:

MarkdownParser.disableMarkdownFor.Bold().Italic();

This provides precise control over the appearance of chat messages, making it easier to customize your mod’s experience.


Key Points

  • Seamless Integration: Add Markdown text styling to Minecraft chat.
  • Flexible Controls: Enable or disable Markdown globally or on a per-element basis.
  • Expandable Features: Future updates will bring customizable syntax and more elements.

Note: The MarkdownParser is designed specifically for Minecraft chat use, enhancing the way text appears during gameplay. It’s a perfect fit for creating immersive and visually appealing chat interactions within the game.

For further information and advanced customization options, refer to the official Discord community where you can seek help, share experiences, and learn from other developers. You may also refer to our API Documentation.