Lang
Messages from lang.yml with placeholders, fallbacks and chat, action bar, title or boss bar output.
Docs updated · What changed
On this page
Lang(plugin) reads plugins/<Plugin>/lang.yml (copied from the jar). Missing keys fall back to the jar's copy, then to the key itself.
{prefix} is the file's prefix key. Placeholder values are escaped so player names cannot inject MiniMessage tags.
Sending messagesLink to this section
val lang = Lang(this)
lang.send(player, "home.created", "name" to home.name) // home.created: "[actionbar] &aHome &f{name} &acreated."
val lore = lang.lines("home.lore", "warps" to listOf("&7Spawn", "&7Shop"))Output and versionsLink to this section
- A text may start with
[chat],[actionbar],[title],[bossbar]or[off]. - Bump
lang-versionin the jar copy when you redesign the texts: the server file is kept aslang-old-<n>.ymland replaced. New keys are added to the server file automatically.