Effective Locale
Base class for a plugin's localized messages.
The plugin must ship its language files under src/main/resources/languages/ (e.g. en.yml, ru.yml). On construction the class copies every bundled YAML from that folder into the plugin's data folder (plugins/<PluginName>/languages/), then loads the file for the language configured in EffectiveSpigot's own config (falling back to en.yml). Look up messages with getMessage (legacy string) or getComponent (Adventure component).
object ExampleLocale : EffectiveLocale() {
override fun getPlugin() = ExamplePlugin.instance
}
// ExampleLocale.getComponent("items.example.name")Functions
Resolves key to an Adventure Component, applying String.format. Strings containing legacy codes (&c, §a) are parsed with the legacy serializer; otherwise MiniMessage is used (<red>, <gradient:...>). Returns the key itself (parsed) if missing.
Resolves key to a legacy string, applying String.format and translating & color codes. Returns the key itself if missing.