modsmith Log in Log in Рус / Eng

Text Placeholder API

placeholder-api · 73884631 downloads · LGPL-3.0-only

library

client: optional · server: optional (declared by the mod author)

Placeholder and Text manipulation library for your Minecraft mods.

Description

About Placeholder API

It's a small, JIJ-able API that allows creation and parsing placeholders within strings and Minecraft Text Components. Placeholder API uses a simple format of %modid:type% or %modid:type data% (%modid:type/data% prior to 1.19). It also includes simple, general usage text format indented for simplifying user input in configs/chats/etc.

For users

It allows users to configure multiple mods in similar way without losing compatibility between mods. Placeholders allow changing what and where any information is present within compatible mods.

Additionally, Simplified Text Format allows to style them in readable way without the requirement of writing JSON manually or using generators.

Mods generally using this api should just include it directly, but you can downloaded updated version from here if needed!

For developers

Usage of Placeholder API is a simple way to achieve good mod compatibility without having to implement multiple mod specific apis. Additionally, the placeholder parsing system can be used for replacing own static (or dynamic placeholders) in Text created by player or read from config. This with combination of Simplified Text Format allows creating great user/admin experience.

*[JIJ]: Jar-in-Jar

Versions (34)

VersionMinecraftLoadersFile
3.2.0+26.3 26.3, 26.3-pre-3 fabric download
3.1.0-beta.1+26.2 26.2, 26.2-pre-1 fabric download
3.0.0+26.1 26.1, 26.1.1, 26.1.2 fabric download
3.0.0-beta.2+26.1 26.1, 26.1-pre-3, 26.1.1, 26.1.2, 26w14a fabric download
2.8.2+1.21.10 1.21.10, 1.21.11 fabric, quilt download
2.8.1+1.21.10 1.21.10, 1.21.11, 1.21.11-pre1, 1.21.9 fabric, quilt download
2.8.0+1.21.9 1.21.10, 1.21.9, 1.21.9-rc1 fabric, quilt download
2.7.2+1.21.8 1.21.6, 1.21.7, 1.21.8 fabric, quilt download
2.7.1+1.21.6 1.21.6, 1.21.7, 1.21.8 fabric, quilt download
2.6.4+1.21.5 1.21.5 fabric, quilt download
2.7.0+1.21.6 1.21.6, 1.21.6-pre2 fabric, quilt download
2.6.3+1.21.5 1.21.5 fabric, quilt download
2.6.2+1.21.5 1.21.5 fabric, quilt download
2.6.1+1.21.5 1.21.5, 1.21.5-rc1 fabric, quilt download
2.1.1+1.19.4 1.19.3, 1.19.4 fabric, quilt download
2.1.4+1.20.1 1.20.1 fabric, quilt download
2.2.1+1.20.2 1.20.2, 1.20.2-rc2 fabric, quilt download
2.4.0-pre.3+1.20.4 1.20.3, 1.20.4 fabric, quilt download
2.4.2+1.21 1.21, 1.21.1 fabric, quilt download
2.5.2+1.21.3 1.21.2, 1.21.3, 1.21.4 fabric, quilt download
2.5.1+1.21.3 1.21.3, 1.21.4 fabric, quilt download
2.5.0+1.21.2 1.21.2, 1.21.2-rc1, 1.21.3 fabric, quilt download
2.4.1+1.21 1.21, 1.21.1 fabric, quilt download
2.4.0+1.21 1.21 fabric, quilt download
2.4.0-pre.1+1.20.4 1.20.4 fabric, quilt download
2.4.0-pre.2+1.21 1.21, 1.21-pre2 fabric, quilt download
2.4.0-pre.1+1.20.5 1.20.5, 1.20.5-rc1, 1.20.6 fabric, quilt download
2.3.0+1.20.3 1.20.3, 1.20.3-rc1, 1.20.4 fabric, quilt download
2.2.0+1.20.2 1.20.2, 1.20.2-rc2 fabric, quilt download
2.1.3+1.20.1 1.20.1 fabric, quilt download
2.1.2+1.20.1 1.20.1 fabric download
2.1.1+1.20 1.20, 1.20.1 fabric download
2.1.0+1.19.4 1.19.4 fabric, quilt download
1.1.3+1.17.1 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2 fabric, quilt download

Modrinth page →