
TextAPI
TextAPI is a Kotlin-native Spigot text engine with a MiniMessage-like syntax, built-in placeholders, gradients, rainbow, 16 pride presets, click/hover/insert events, and a custom TPS ticker. All fully extensible at runtime via a clean handler-based API.
Links
Tags
Creators
Details
1.0.2
Compatibility
Changes
[1.0.2] - Placeholders Expansion & TPS System
Added
TextTPSobject with a custom rolling tick history buffer (600 ticks)- TPS calculation at multiple intervals:
getTps1s(),getTps5s(),getTps10s(),getTps30s() - MSPT (milliseconds per tick) calculation via
getMspt() getFormattedTps()andgetFormattedMspt()convenience methodsTextTPS.init()called on plugin enable via aBukkitRunnableticking every server tick- Built-in placeholder
{server_tps}backed by the custom TPS ticker - Built-in placeholders:
{datetime},{timestamp} - Built-in placeholders:
{player_ping},{player_locale} {player_online}as an alias mirroring{server_online}scoped to the player context
Changed
TextPlaceholders.registerDefaults()reorganized into clearly separated sections: player identity, server, time, misc{time}format updated toHH:mm:ss{date}format updated todd/MM/yyyy{datetime}format set todd/MM/yyyy HH:mm:ss{player_exp}now formatted to 2 decimal places via"%.2f"{server_tps}now formatted to 2 decimal places via"%.2f"
Fixed
{player_health}now returns the floored integer value instead of a raw double- Placeholder resolver returning
nullfor a missing player now correctly falls back to an empty string inTextContext.buildinstead of the literal string"null"
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:NvPsOCVp:KjbskIBu"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:NvPsOCVp:KjbskIBu"
}
