8000 GitHub - titan-realms/lang-formatter: A lib to format/interpret our message format
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

titan-realms/lang-formatter

Repository files navigation

lang-formatter

Project Status

This project is no longer maintained. We are now using MiniMessage as it is a more adopted system and widely used within Paper, Minestom and Velocity communities. You can check it out here https://docs.adventure.kyori.net/minimessage/


This is our API/library that parses our language spec from lang files into objects. These are then distributed across our servers to deliver dynamic messages to players on demand.

This library is designed to render into Adventure Componenets.

NOTE: We will not provide any support for this project. Its development is completely internal and it's only open sourced as we thought others may find it useful. Only issues related to bugs will be dealt with.

Spec

{#hex} = hex colour code
{!obfuscated/bold/strikethrough/underlined/italic} = style codes
{@placeholder} = placeholder rendered when converted into component
{"placeholder" > 1 ? "true text" : "false text"} = conditional text using a placeholder rendered when converted into component

Examples

Ice Cream

{#00000}{!bold}get your {#ffffff}{@ice-cream-limit} {#00000}free ice cream{"ice-cream-limit" > 1 ? "s" : ""}

  • The entire text will be bold
  • get your will be black
  • {#ffffff}{@ice-cream-limit} will become white and will display their ice cream limit.
  • The remaining text will be black.
  • If ice-cream-limit is > 1, an s will be appended onto the end. Otherwise, nothing will be appended.

Example output 1: get your 10 free ice creams
Example output 2: get your 1 free ice cream

About

A lib to format/interpret our message format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0